Closed nelsonic closed 3 years ago
System Preferences > Energy Saver settings on Mac: "Computer sleep: Never"
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
Fail:
185.3.95.195 178.79.141.232
Good to see you're still working on this 👍
Hi @lukeeey, 👋
Indeed ... 👨💻 ⏳
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:
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.
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 Connectionsecho "ServerAliveInterval 60" >> ~/.ssh/config
This should only take a few mins of googling and reading, but i need to document it. 📝
This is a subtask of https://github.com/dwyl/hits/issues/81 which in turn will un-block https://github.com/dwyl/hits/issues/117 and https://github.com/dwyl/hits/issues/101 etc.