ssh is a quick way to log on and access the file system of your server. From the bash shell on WSL, I would use this command.
$ ssh firstname.lastname@example.org
The remote server will prompt you for the password. You can skip the password step by installing key-based SSH. ( Note:you will still be able to log on using a password on devices without a key pair).
jimmy@WSLBASH:~$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/jimmy/.ssh/id_rsa):
Enter – accept as default
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Enter – leave the passphrase as blank
Your identification has been saved in /home/jimmy/.ssh/id_rsa.
Your public key has been saved in /home/jimmy/.ssh/id_rsa.pub.
The key fingerprint is:
The key's randomart image is:
| .=++..+ oE |
| + =|
| = |
Your output should look something like this.
Now you have a private and public key saved in ~/.ssh/
Copy the public key to your server.
ssh-copy-id -i ~/.ssh/id_rsa.pub yourserver.com
Now you should be able to log in using ssh without having to enter a password. No password means you can start using other useful bash commands such as scp and rsync.
You can simplify ssh login by creating a configuration file
sudo nano ~/.ssh/config
Enter these commands for user jimmy
You can now ssh into your server with
Once you have this setup you can harden ssh by removing root login and preventing ssh login by password. This makes a ssh brute force attack much more difficult.