2
1
I am trying to setup a ssh gateway. I have a physical host (H) and a number of VMs on it. The host can ssh to one of the VMs (A) and then ssh to others from it (lets call it B). I have this in .ssh/config
in H
Host B
User foo
ProxyCommand ssh foo@A nc %h %p
Now when I do ssh -vvv -l foo B
on H
I see this error: ssh_exchange_identification: Connection closed by remote host
cat /var/log/auth.log
on A says:
Jun 7 18:54:00 ubuntu sshd[846]: Received disconnect from 192.168.129.1: 11: disconnected by user
Jun 7 18:54:00 ubuntu sshd[834]: pam_unix(sshd:session): session closed for user foo
Jun 7 18:54:11 ubuntu sudo: foo : TTY=pts/6 ; PWD=/home/foo ; USER=root ; COMMAND=/usr/bin/tail /var/log/auth.log
Jun 7 18:54:11 ubuntu sudo: pam_unix(sudo:session): session opened for user root by foo(uid=30000)
/etc/hosts.allow
on A
sshd: ALL
ssh: 0.0.0.0/0.0.0.0
It seems H is saying that A closed the connection and A says that H closed the connection!
/etc/ssh/ssh_config
on H
Host *
SendEnv LANG LC_*
HashKnownHosts yes
GSSAPIAuthentication yes
GSSAPIDelegateCredentials no
What else can go wrong here?
You using ssh keys? Your key could be wrong. Also iptables. – MattPark – 2013-06-07T20:02:31.203
ssh keys are not wrong probably. I can login using the same keys by first logging in to A. iptables on all boxes are empty. – Abhishek Chanda – 2013-06-07T21:06:21.123