0 command SSH for Dummy using Bitvise Client
download bitvise client https://www.bitvise.com/ssh-client-download
-setup your login credential using password(we use unbuntu in this example)
1. the server ip address
2. default ssh port is 22
3. username
4. password
5. check the box if you want to store the password
6. 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
1. select the ssh profile you created just now
2. click export
3. export the public key in open ssh format
4. 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 a `authorized_keys` file
- double click `authorized_keys` file and open it with notepad
- now open `yourpubkey` and copy the content to `authorized_keys` and save `authorized_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
1. edit the ssh config
`sudo nano /etc/ssh/sshd_config`
2. find this line
`#PasswordAuthentication yes`
3. change it to (remember to remove the `#`)
`PasswordAuthentication no`
4. save the file and restart ssh
`sudo systemctl restart ssh`
make sure your ssh is working before you try to disable password login!