I mentioned a week or two ago that ssh was on my list of favorite utilities and tools, alongside things like nfs and the double-greater-than symbol. I didn’t say much about the experiences I’ve had with it though, and since that’s a slight oversight I thought I’d take the time to endorse it properly.
I most recently used ssh between the Sotec desktop machine running Arch Linux, and the two laptops I have both running Crux (at one point I had the Inspiron running Ubuntu, and I know I used it at one point on that machine, but it was brief and only for a minute or two). In this case I had set up the desktop to run “headless,” which I understand to mean “without an attached monitor.” (So can I call a machine without a keyboard “fingerless?”)
If you’re not familiar with ssh, it is, in a nutshell, exceptionally cool. That machine had no keyboard, mouse or monitor, so controlling it was done by logging in across the network. On one machine that was wired and on another it was wireless, but it doesn’t really matter since both machines suddenly “became” the host machine.
And I could rely on configurations and settings saved on the host machine to trigger when I logged in over the network. As an example, the .screenrc file on the host machine took effect when I started screen after signing in. That might sound unnecessarily oversimplified, but once you see where I’m going with this, it becomes so obvious as to be genius.
With screen started, I could detach and reattach between machines. You might already acknowledge screen (or similar programs, like tmux, et al.) as useful when working only on one machine. Now imagine signing in to a machine over your network, starting screen and, for example, rtorrent plus a couple other programs, detaching screen, signing off on that machine, then signing back on from a second machine, and reattaching the screen session that is still running.
Again, I apologize if that seems like a dreadful oversimplification of what ssh and some other programs can do under these circumstances. It sounds rather obvious to me too, but again, I began my computer adventures working on mainframes, and it would be more surprising to me not be able to do those things.
But an added benefit to a “home” user is that a machine can run by itself, in a corner, with no accessory devices (like monitor, mouse or keyboard). If it were light enough, and perhaps low-powered, it could conceivably use as little energy as a laptop, and if it was one of a rare breed of quiet desktops, you wouldn’t even know it was on. Once again I think of that strange 400Mhz Celeron desktop I once found, with no fans in it and only a strange fork-shaped heat sink; it would have been perfect.
It also means you can strip a machine to almost nothing and incur no necessities, like the monitor, etc. You could even rely on it to run in a memory-only machine, or something booted from a live CD and running without a safety net. Or perhaps a laptop with a shattered LCD. In any case, once you see the value of being able to control a machine, interactively, over a distance, the possibilities multiply exponentially.😉
And I know it’s probably not a wise idea, but I switched to the root account (with su, not logging in as root) more than once, and updated the system software, or performed a reboot. Once the machine had restarted, I signed on again and continued whatever mischief I had started.
Setting it up was a piece of cake, mostly because the Arch Wiki, of course, has a fantastic page set aside just for that purpose. (Is there anything the Arch Wiki doesn’t have excellent instructions for?) It literally took me only two edits of the configuration file, a quick addition of the ssh daemon to my /etc/rc.conf file, and I was in business. Usually I have to troubleshoot these things for a few minutes before getting them right, but ssh worked for me on the first try.
I suppose I can stop gloating over it now, since it’s only the most fundamental and commonplace of tools, and I’m behaving as if it were a cure for cancer. Still, for as many peculiar spots as you can find yourself in, or as many unusual and contorted systems as you can find in a garage sale, this works as a great solution. If nothing else, it can save you a minute or two getting up out of your chair to walk across the room and press a key or two. I’m always in favor of that.😀