I want to connect to server B which is behind a firewall, using AliasForB. I SSH to server A first, and then from there I can SSH to server B. I am attempting to connect directly to server B by typing shorthand "ssh AliasForB". Both A and B require different usernames.
Based on a previous response, I used the following configuration, however, there is a small problem. When I close the connection, it appears that the connection on A is "killed" rather than closed gracefully. How can I fix this?
$> logout
Connection to B closed.
Killed by signal 1.
My configuration:
Host AliasForA
Hostname FQDN.for.A.com
User MyUsernameForA
Host AliasForB
Hostname FQDN.for.B.com
User MyUserNameForB
ProxyCommand ssh AliasForA nc -w 3 %h %p