Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
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 3Server 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.

![]() |
![]() |
![]() |

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