Rosh: The Roaming Shell
Are there the servers at home, or the on-premise servers at office?
If no, the mosh is your best friend and this article is just a waste of time.
But if yes, the Rosh might help your life.
Rosh is the roaming shell like the mosh.
But it can track the server even if its IP address change.
It reconnects to the server by resolving the hostname each time.
You can use the local DNS such as the dnsmasq for your on-premise servers so that you can resolve the server by same name no matter where you are.
The usage of Rosh is simple, like this
sh>>
gem install rosh
rosh yourserver.com session-name
<<--
It installs the nested GNU screen session remotely at the given server.
You can omit the session-name, "default" is used as the name.
Then, Rosh connects to the session via the SSH.
If you want to detach the session, type Ctrl+t d.
On the second time you connect, Rosh reuses the remote session.
Requirements
- SSH
- Ruby at your machine (2.0.0 or later. Sorry, I don't have 1.9.x or older)
- GNU screen at remote servers