5 ms·
The list misses one of the best. Connect through a jump host directly to the target server using ProxyCommand and nc: http://undeadly.org/cgi?action=article&si
by Argorak 12y ago
The list misses one of the best. Connect through a jump host directly to the target server using ProxyCommand and nc:
http://undeadly.org/cgi?action=article&sid=20070925181947 http://undeadly.org/cgi?action=article&sid=20070925181947
Combines well with aliases - prefix all hosts with a common name and use "Host prefix-*" to setup the ProxyCommand.
- mahmoudimus 12y agoYou do not need nc anymore. -W flag intelligently forwards traffic and interpolates correctly
- stock_toaster 12y agoRequires openssh > 6.0 to work consistently with controlpersist. I still have problems on Centos 6.x boxes, so I still use nc in proxycommand for those hosts. https://news.ycombinator.com/item?id=4678117 https://news.ycombinator.com/item?id=4678117
- qzervaas 12y agoI have the following in my ~/.ssh/config, which for those who don't know, maintains the connection even after you disconnect so you can reconnect really quickly: ControlMaster auto ControlPath /tmp/%r@%h:%p ControlPersist yes Having said that, sometimes I need to remove the entry from /tmp to reconnect if my network settings have changed.
- stock_toaster 12y ago> Having said that, sometimes I need to remove the entry > from /tmp to reconnect if my network settings have changed. You can also just send the exit command to the conn. ssh somehost -O exit In addition, I put my controlpath in my .ssh dir. Keeps it out of the global /tmp dir. shrug controlpath ~/.ssh/cp-%r:%h:%p
- voltagex_ 12y agoHave you used ControlPath with a very long hostname? I haven't worked out how to stop one of my IPv6 hosts failing with that setup - the DNS RR is really long (causes problems with IRC, too!)
- stock_toaster 12y agoHmm. I have one control file with 44 chars in it. That is probably the longest one I have hit. You could always give it a dns cname alias or something.