The scenario is like:
SERVER_A="servera.com"
SERVER_A_UNAME="usera"
SERVER_B="serverb.com"
SERVER_B_UNAME="userb"
I want to write a shell script which will fist connect to server A, and then only it would be connected to server B. Like:
#!/bin/sh
ssh $SERVER_A_UNAME@$SERVER_A ...and then
ssh $SERVER_B_UNAME@$SERVER_B
But I am not able to do it. It does connect to server A only. How can I achieve it?