User Tools

Site Tools


blog:ssh-proxy-command

ssh-proxy-command

While browsing through ssh_config(5), I stumbled over the option ProxyCommand, which allows specifying an arbitary command for establishing the connection to the remote sshd. While the manual gives the example of using netcat to connect through an http proxy, I was thinking about something else. At home, I'm using an openwrt router , which offers a dropbear sshd , from where I can connect to my workstation at home. In order to faciliate this, I added this tho me ~/.ssh/ssh_config:

Host workstation-remote
	ProxyCommand ssh home nc workstation 22
	User rho

So this in fact, I'm still using netcat like suggested in the manual, but on the router on the remote host. Neat. Together with a ControlMaster socket, connections now go really fast:

Host *
 	ControlPath ~/.ssh/master-%r@%h:%p
	ControlMaster auto

~~DISCUSSION~~

ubuntu debian english

blog/ssh-proxy-command.txt · Last modified: 2008/10/18 15:56 by 127.0.0.1