download bitvise client https://www.bitvise.com/ssh-client-download
-setup your login credential using password(we use unbuntu in this example)
- the server ip address
- default ssh port is 22
- username
- password
- check the box if you want to store the password
- save your profile so you can reuse it
- click client key manager, we will generate a new ssh profile(the key pair) general rule: client should create the key pair, not server
- use default setting
optional: you can add passphrase, this is useful in case your key get stolen, but it will prompt you for passphrase every time you try to login (bitvise will not save the passphrase in profile). We will not add passphrase in this example.
- export the public key
- select the ssh profile you created just now
- click export
- export the public key in open ssh format
- save it in a file, name it to anything you want, in this example, the name is
yourpubkey
- finally login(click the login button at the bottom) to your server using password. After login successful, click on the New SFTP window on the left bar.
- go to home and create a
.ssh
folder
- inside the
.ssh
folder, create aauthorized_keys
file
- double click
authorized_keys
file and open it with notepad
- now open
yourpubkey
and copy the content toauthorized_keys
and saveauthorized_keys
, the content should look like this:
- now we can test the ssh connection, logout(click log out at the bottom) the current session and try to login with ssh. Change the method to public key and use auto client key
you should be able to login now, enjoy!
If you want to add new public key to your server, open the same authorized_keys
file, append the new key one line under the old key
extra:
you may want to disable password login
edit the ssh config
sudo nano /etc/ssh/sshd_config
find this line
#PasswordAuthentication yes
change it to (remember to remove the
#
)
PasswordAuthentication no
save the file and restart ssh
sudo systemctl restart ssh
make sure your ssh is working before you try to disable password login!
Top comments (0)