31
How to Connect to a Remote Computer/Server via SSH
Secure Socket Shell commonly called SSH is a protocol that allows you to securely connect to a remote computer using the command-line interface(CLI). It’s so easy to set up and eliminates the need for manual logins.
Some of the reasons why you may be interested in setting up SSH are:
This short article explains how you can quickly set it up an SSH connection to your remote machine.
Before starting with the setup procedure, please make sure you have the following:
On your local computer, open up a terminal and do the following steps.
ls -ll ~/.ssh
If you already have SSH keys on your local computer you should see a file with one of the following names
Id_rsa.pub
id_ecdsa.pub
id_ed25519.pub
ssh-keygen -t ed25519 -C "put_your_email_address_here"
You should get a prompt saying:
Enter a file in which to save the key
. Press the Enter Key
on your keyboard to use the default file location or enter a custom file name.Then follow the prompt if you’d like to set a passphrase for your SSH key. You can skip this by hitting the
Enter key
twice.eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
cat
command to print out its content and then copy the output from the terminal:
cat ~/.ssh/id_ed25519.pub
Awesome! Now you have everything set on your local computer. Let’s move on to set up the remote computer.
Login into your remote computer and do the following steps on the terminal.
cd
into your SSH directory:
cd ~/.ssh
authorized_keys
file
echo “put_your_public_ssh_key_here” >> authorized_keys
sudo systemctl restart ssh
Now, you’re done setting up your remote computer. All you have to do is to connect to your remote computer from your local computer.
To connect to your remote computer, open a terminal on your local computer and run the code below and you should be connected:
ssh public_ip_of_your_remote_computer
Congrats you made it!

And that’s how to connect to a remote computer over SSH.
If you found this article helpful please leave a like. Also, check out my awesome Youtube channel where I do all sort of fun tech stuff
31