Sample Header Ad - 728x90

Run several ssh in a row (one within another)

0 votes
1 answer
111 views
I would like to do the following in a one-liner (so I can alias it in my .bashrc) 0. before doing anything I am user1 on server0 1. ssh to server1 2. impersonate user2 (**THIS HAS TO BE DONE BY sudo -u user2 sudosh**) 3. ssh from server1 to server2 4. cd dirOnServer2 so my prompt would be after user@server0:/dirOnServer0) superSshCommand user2@server2:/dirOnServer2) Is this possible ?
Asked by statquant (371 rep)
Jan 27, 2017, 02:23 PM
Last activity: Aug 22, 2017, 01:25 PM