Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to avoid SSH Timeout when downloading large or lots of files? #73

Closed
3 tasks done
nelsonic opened this issue May 22, 2021 · 7 comments
Closed
3 tasks done

How to avoid SSH Timeout when downloading large or lots of files? #73

nelsonic opened this issue May 22, 2021 · 7 comments

Comments

@nelsonic
Copy link
Member

nelsonic commented May 22, 2021

When attempting to download a large file (or set of files) over SSH (e.g. to Backup/Migrate a VM),
the SSH Connection times-out and I have to restart the process. 🤦

I need to refresh my memory on how to do this.

Todo

  • Configure the VM to not Timeout SSH Connections
  • Configure iTerm to not timeout SSH -> echo "ServerAliveInterval 60" >> ~/.ssh/config
  • Set Mac to not sleep when plugged in to power 🍏

This should only take a few mins of googling and reading, but i need to document it. 📝

This is a subtask of dwyl/hits#81 which in turn will un-block dwyl/hits#117 and dwyl/hits#101 etc.

@nelsonic
Copy link
Member Author

System Preferences > Energy Saver settings on Mac: "Computer sleep: Never"
image

@nelsonic
Copy link
Member Author

This looks like what I need: https://superuser.com/questions/699676/how-to-prevent-ssh-from-disconnecting

Edit your ~/.ssh/config file on your Mac (localhost) and add the following line:

ServerAliveInterval 60

@nelsonic
Copy link
Member Author

Fail:
linode-requires-javascript

@nelsonic
Copy link
Member Author

185.3.95.195 178.79.141.232

@lukeeey
Copy link

lukeeey commented May 24, 2021

Good to see you're still working on this 👍

@nelsonic
Copy link
Member Author

Hi @lukeeey, 👋
Indeed ... 👨‍💻 ⏳

@nelsonic
Copy link
Member Author

Ok, this seems to be working without needing to update anything on the VMs, just the ServerAliveInterval 60 in ~/.ssh/config on localhost is enough to keep the connection alive provided the Mac stays on.

I'm using an ancient (in computer terms) Mac Mini to backup the VMs:
Screen Shot 2021-05-23 at 7 19 08 AM

and I left it on overnight downloading all the files from the two VMs. Switched off the screen to not waste energy, but the Mac Mini stayed on doing happily doing it's thing.
I know I could use a Raspberry Pi Zero to do this task, I don't need an Intel i5 ... but this computer is "free" so I'm using it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants