Learn to Code via Tutorials on Repl.it!

← Back to all posts
How to use SSH

SSH stands for "Secure Shell", and it basically allows you to connect to your computer remotely. Here's a screenshot of sshing into Ubuntu from a Windows computer:

Do note that this will not work on repl.it.

Using the SSH Server

First, we need to install the ssh server with:

To check that it's running, type:

(to exit from the command, type 'q')
Make sure to unblock SSH on your firewall. If you're using Ubuntu with ufw:

Now that we've setup the server, we need to connect to it with a client.

Using the SSH Client

Install the SSH client if it isn't already there:

Now you can connect to the server:

<user> should be replaced with the user you want to login as, <ip address> should be the ip address of the computer or the hostname, and <port> should be the SSH port. You can find your ip address if you don't know it already with ip address (look for inet). The -p <port> part can be omitted if you set the SSH server to listen on the default port (22)
If it asks about the authenticity of the host type yes.
Now, it'll ask for your password.
If all goes well then you'll be connected to your remote computer!
Note that if you want to run graphical applications you'll need to have an X server installed.

Other operating systems

You can find how to install an SSH server on Windows here and how to do it on MacOS here. You can connect to SSH with the steps here.
If you have a chromebook, you can connect to ssh with the steps here. You can't start an ssh server without developer mode.


sudo apt-get install openssh-client

not necessarily
try sudo dnf install openssh-client.
because, let's face it, ubuntu is for babies.


@firefish this tutorial is only written for Ubuntu because so many people use Ubuntu, and that doesn't mean I like Ubuntu.
sudo pacman -S openssh


@programmeruser haha dnf install openssh go brrr


@firefish Arch > Fedora


@programmeruser Ah yes, an inequality the wrong way around.


@firefish imagine using dnf


@programmeruser imagine not being dumb


@programmeruser Must admit, transaction checks do take a lifetime, but it's not like you can't do other things in the meantime.

I'm running Fedora 23 Workstation, on a PC with Intel Core 2 Duo 6600 and 4GB RAM

Ha! ancient technology.
I'm running Fedora 33 Workstation, on a PC with an AMD A8-5550M and 6GB RAM.