Beginner’s Guide To Setting Up SSH On Linux

CLILinux

One of the best and most amazing things about Linux is the ability to connect and administer remotely using SSH (Secure Shell). You can add and remove programs, check and restart services. The possibilities are endless. Using SSH is a breeze and if you follow the instructions below you’ll have it setup in no time.

We’re using Ubuntu 20.04 for this example so open terminal and type: sudo apt-get install openssh-server You can open terminal by pressing the start button your keyboard and type “term” you should see the terminal in the list. This also works for any program you want to open without hunting through the menu for it. After you complete the command enter your password then answer yes to install the software.

After this step is complete and the software is installed you’ll need your computers name or IP address to connect remotely. Type: hostname into the terminal. You can see below my computer is named laptop. Pretty amazing right?

To connect to your Linux machine from windows you’ll need a shell program. I use Putty because it’s super easy and has been around forever. If you’re using a Mac or another Linux machine just open the terminal program and type ssh username@hostname , you’ll need to replace username with your user name and hostname with your hostname. Above we used p4k9@laptop. You’ll be asked if you trust the computer you’re trying to connect to and if you want to proceed. Type yes and enter the users password and you should be connected. Below you can see I connected to a raspberry pi remotely running Raspbian. I use this little machine to experiment quite a bit. The Raspberry Pi sits in another room across the house without a mouse, keyboard or monitor.

Leave a Reply

Your email address will not be published. Required fields are marked *