How to connect to a server using another server by ssh in shell script? -
the scenario like:
server_a="servera.com" server_a_uname="usera" server_b="serverb.com" server_b_uname="userb"
i want write shell script fist connect server a, , connected server b. like:
#!/bin/sh ssh $server_a_uname@$server_a ...and ssh $server_b_uname@$server_b
but not able it. connect server only. how can achieve it?
you may able find previous question:
how use bash/expect check if ssh login works
depending on situation might execute remote ssh command , wait positive feedback.
see:
Comments
Post a Comment