ssh during low bandwidth

2

I currently invoke the following ssh command over my home wifi (from OSX to Ubuntu):

ssh -XYC -l my_username -c arcfour,blowfish-cbc -XC my_local_server

This works great, except during low bandwidth situations, like if I'm streaming music over the Web, while I'm coding.

In these situations, the ssh often drops, within a minute or two.

Is there a better setting or configuration that I can try over low-bandwidth situations?

kfmfe04

Posted 2012-11-15T05:11:06.643

Reputation: 645

Answers

3

When I'm concerned about dropping connection, I use "screen" to create a virtual terminal. That way if ssh goes down, my programs continue running and I can reconnect.

$ screen sudo su - userX

Make sure you get the identity of your session, so you can reconnect later:

$ screen -list

Should give you something like pid.tty.hostname

Now if your ssh session drop, you just restart it and reconnect to you virtual terminal:

$ screen -r <pid>.<tty>.<hostname>

Check out "man screen" for more gory details.

Also - I've heard good things about "mosh" (MIT Mobile Shell), but I haven't played with it yet. http://mosh.mit.edu/

joel

Posted 2012-11-15T05:11:06.643

Reputation: 255

1

There's not a whole lot you can do with just SSH. You've already enabled compression. You might consider using a shorter MAC, though I'm skeptical this will help very much. For example, I use

MACs umac-64@openssh.com,hmac-md5-96,hmac-sha1-96,hmac-md5,hmac-sha1

(man ssh_config for more details.)

But in general, SSH just doesn't do very well in situations where there are frequent packet drops. I don't know what your situation is, but maybe you can prioritize SSH traffic above your other traffic (e.g., QoS)? You may also consider something like Mosh, which should deal with the packet drop issue.

jjlin

Posted 2012-11-15T05:11:06.643

Reputation: 12 964