Jan 31, 2023 1 min read

Basic Usage of OpenSSH

Basic Usage of  OpenSSH

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 we know the password for the user account user then we will be able to login to that remote system.

While there are a lot of SSH utilities available, the one I use the most is OpenSSH. This works directly in the command line and is one of the tools I rely on the most.

Here's an introductory video on using OpenSSH. It demonstrates connections between a host computer and virtual machines in VirtualBox. Enjoy!

Some commands on Linux:

  • 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 (type choco install openssh), or in macOS with Homebrew (type brew install openssh).


Note: VirtualBox users will have to use the port forwarding trick, and connect with a command similar to this:

ssh user@127.0.0.1 -p 2222

See this link to find out how to enable and use port forwarding in VirtualBox.

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.


👍
Thank you for reading this post. I hope you benefit from it!
Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to Prowse Tech.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.