Friday, June 7, 2013

Cannot setup ssh gateway

Cannot setup ssh gateway

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
What else can go wrong here?

No comments:

Post a Comment