Supplemental Material: SSH (Secure Shell)
SSH is the Secure Shell, and it is widely used to remotely control computers from the command line. Here's a typical example of a connection to another computer via SSH:
ssh user@10.0.2.4
With that command, we make an SSH connection to the remote computer that has the IP address 10.0.2.4. Typically, if you know the password for the user account 'user', then you will be able to log in to that remote system.
While there are a lot of SSH utilities available, the one we use the most is OpenSSH. This works directly in the command line and is one of the tools we rely on the most when working with remote systems.
Here's an introductory video on using OpenSSH. It demonstrates connections between a host computer and virtual machines in VirtualBox. Enjoy!
Check if OpenSSH is installed:
ssh -V
Check if an OpenSSH server is running:
systemctl status sshd
Install OpenSSH server (on Debian/Ubuntu):
apt install openssh-server
Install OpenSSH client (on Debian/Ubuntu):
apt install openssh-client
Note: If you are not using Debian or Ubuntu, replace apt
with your Linux distribution's package manager.
You can install it in Windows with Chocolatey (choco install openssh
), or in macOS with Homebrew (brew install openssh
). Many versions of Windows have it installed already.
Note for VirtualBox Users: You will have to use the port forwarding trick and connect with a command similar to this:
ssh user@127.0.0.1 -p 2222
You might also be interested in SSH connection manager utilities such as PuTTY, Solar-PuTTY, MobaXterm, mRemoteNG, SecureCRT, and Kitty. If you have a lot of SSH connections that you make on a daily basis, a connection manager can make things a bit easier for you.