Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Thomas Knox
April 1, 2009, 1:51 pm
rate this thread
I have a server B that can only be accessed by going through server A.
The normal steps are:
1) ssh from my desktop to server A
2) ssh from server A to server B
I want to streamline that process a bit, so I edited ~/.ssh/config to
add the lines:
LocalCommand ssh -A -t B
That works, but I cannot ever get out of host A. In other words, from
my desktop I type
and lo, I get connected to B. However, when I type "exit" on B, I get
dropped to A, and I cannot ever leave. Every time I type "exit" on A,
I immediately get logged back in to A again.
What am I doing wrong?
Re: ssh jumphost
I never tried that, but i think when you exit on B control is given back
to A and on A you carry out the only allowed command: ssh -A -t B
Maybe ssh -A -t B; exit
might work - i did not test it. There is a way to jump to B using
ProxyCommand. Therefore, nc (netcat) should be installed on A:
Try to rewrite your local ~/.ssh/config to
HostkeyAlias B # not sure, wether that is necessary or not
ProxyCommand ssh A nc %h %p
and then type
you might want to read man ssh_config and look for ProxyCommand to
- » ssh on command line: force using a group size (prime size) of 1024 (and no...
- — Newest thread in » Secure Shell Forum