Computing.Net > Forums > Unix > Login using script file

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Login using script file

Reply to Message Icon

Name: mailtovshankar
Date: December 10, 2008 at 08:02:49 Pacific
OS: UNIX
CPU/Ram: don't know
Product: Don't know / DON'T KNOW
Comment:

I have basic working knowledge of UNIX. I work in an environment where I need to login to multiple servers to work. I need to write a script file which will take me to the end server without user intervention.

For e.g. I have three servers - server 1, server 2 and server 3

I first login to server 1 using ssh server1.
Once I am logged into Server 1, I then do a ssh -l <username> Server2
I enter the password here for Server 2
Once I am logged in to Server 2, I then do a ssh -l <username> Server3
I then enter the password here for server 3

Server 3 is the end place where I would actually work and I need to take the above to log on to Server 3 due to various restrictions and access.

Is there a way, I can write a script file which will directly take me to server 3 upon executing that script file. I am ok if I need to hard code all the details like server name, username and password in the script file.

Pleas help me by providing a solution.



Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Login using script file

C shell unix script file www.computing.net/answers/unix/c-shell-unix-script-file/4444.html

Ideas for useful scripts www.computing.net/answers/unix/ideas-for-useful-scripts/6059.html

small script www.computing.net/answers/unix/small-script/6319.html