We have a setup whereby we cannot login to ServerB directly by using putty.
We have to first login to ServerA by providing username and password and it somehow takes us to serverB and prompts for the password for my login id for ServerB. Providing the password again logs me onto ServerB where I have a script test.sh which I need to execute.
I wanted to automate the execution of script test.sh on ServerB from my local windows machine hence I wrote the below command.
This command logs me onto ServerA but does not take me to ServerB hence test.sh script is not found.
I cannot logon to serverB due to this hopping concept in place.
My two cents on this. How is that you can login to ServerB from ServerA and not from your local windows machine.
To verify if the ServerB is accessible from your local windows machine try pinging the serverB from the cmd window. If you cannot ping then the serverB is not in the same network or domain.
To verify that the ports are open form your local windows machine try doing telnet to serverB from putty to port 22 which is the default port for ssh login. If you are not able to telnet to ServerB you cannot login to the remote machine.
Also are ServerA and your machine on the same domain? In case they are not in same domain, you need to use SSL VPN to connect to the ServerB from your local machine.
In case they are in the same domain, you need to see if there is any proxy required to login to ServerB from your local machine. Check with your system administrator for more details.