Debian based ssh

install ssh server

$ sudo apt install openssh-server
$ sudo systemctl enable ssh
$ sudo systemctl start ssh

configure firewall and enable port 22

$ sudo ufw allow ssh
$ sudo ufw enable
$ sudo ufw status

add putty key

Now, you need to paste the copied public key in the file ~/.ssh/authorized_keys on your server.


$ mkdir ~/.ssh
$ chmod 0700 ~/.ssh
$ touch ~/.ssh/authorized_keys
$ chmod 0644 ~/.ssh/authorized_keys
after that you can copy public key created by putty to authoized_keys file
$ sudo systemctl restart sshd