Live data from Hacker News

SSH Multiplexing & other OpenSSH Tricks

symkat.com

21–24 of 24 posts

Re: SSH Multiplexing & other OpenSSH Tricks

#21
Is there a way to do the reverse? That is, can I ensure a more stable connection by using one terminal to open multiple SSH TCP connections for faster speed and redundancy?

My workplace sometimes suffers from serious problems and because TCP allocates resources based on number of connections, I'm pretty sure I can improve the situation by establishing 2 tcp connections for the terminal.

Re: SSH Multiplexing & other OpenSSH Tricks

#22
post #7

'-t' is also useful if you have machines behind a NAT you want to get to: ssh -t gateway.example.com ssh protected_machine

Or you could add the following to your ~/.ssh/config instead:

    Host protected_machine other_protected_machine
    ProxyCommand /usr/bin/ssh gateway.example.com /bin/nc -w 3700 %h %p
(Assumes you have /bin/nc installed on your gateway.)

Re: SSH Multiplexing & other OpenSSH Tricks

#23
post #11

Earlier quoted context omitted.

You can create 'fake' hosts but with the same hostname: ~/.ssh/config Host serverWith HostName server.home.net OptionBLA yes Host serverWithout HostName server.home.net OptionBLA no It also has autocomplete, so you can type ssh server

"It" being your shell. Some do.

You are right, but who is the masochist that uses one that doesn't have that functionality ? ;)

Re: SSH Multiplexing & other OpenSSH Tricks

#24
post #21

Is there a way to do the reverse? That is, can I ensure a more stable connection by using one terminal to open multiple SSH TCP connections for faster speed and redundancy? My workplace sometimes suffers from serious problems and because TCP allocates resources based on number of connections, I'm pretty sure I can improve the situation by establishing 2 tcp connections for the terminal.

TCP was designed to assume that packet loss was due to contention... so if you have random or other non-contention-related packet loss, your sessions will slow to a crawl. In this case multiplexing might make things worse than separate sessions... but you're probably just as screwed either way. What you really need to do is just get them to fix the random packet loss problem you probably have.
Post reply on HN