ssh keys - Can't get SSH ProxyCommand to work (ssh_exchange_identification: Connection closed by remote host) -
i'm unsuccessfully trying use ssh proxycommand connect server via jump box. config below, i'm running command:
ssh 10.0.2.54 -f ssh.config -vv
host x.x.x.x     user                   ec2-user     hostname               x.x.x.x     proxycommand           none     identityfile           /users/me/.ssh/keys.pem     batchmode              yes     passwordauthentication no  host *     serveraliveinterval    60     tcpkeepalive           yes     proxycommand           ssh -w %h:%p -q ec2-user@x.x.x.x     controlmaster          auto     controlpersist         8h     user                   ec2-user     identityfile           /users/me/.ssh/keys.pem   the result is:
openssh_6.2p2, osslshim 0.9.8r 8 dec 2011 debug1: reading configuration data ssh.config debug1: ssh.config line 9: applying options * debug1: auto-mux: trying existing master debug1: control socket "/users/me/.ssh/mux-ec2-user@10.0.2.54:22" not exist debug2: ssh_connect: needpriv 0 debug1: executing proxy command: exec ssh -w 10.0.2.54:22 -q ec2-user@x.x.x.x debug1: identity file /users/me/.ssh/keys.pem type -1 debug1: identity file /users/me/.ssh/keys.pem-cert type -1 debug1: enabling compatibility mode protocol 2.0 debug1: local version string ssh-2.0-openssh_6.2 debug1: permanently_drop_suid: 501   how can work/troubleshoot issue?
thanks,
controlpersist in combination proxycommand not effective , miss controlpath option. not problem here.
first of all, if using non-standard config file , want used proxy command, need specify there. -q option makes connection quiet have no idea going on under hood of proxy command. loglevel debug3 option quite useful.
this line:
proxycommand           ssh -w %h:%p -q ec2-user@x.x.x.x   needs (and don't need username specified above):
proxycommand           ssh -w %h:%p -f ssh.config x.x.x.x   you have wrong order of parameters in command:
ssh 10.0.2.54 -f ssh.config -vv   needs be:
ssh -f ssh.config 10.0.2.54   as can read manual page. , -vv not needed if use loglevel option.
then should work (at least did me, otherwise investigate log).
Comments
Post a Comment