Here are some tips my friend.
Here is a better command to run to create the ssh key.
$ ssh-keygen -t rsa -b 4096 -C “brandon@example-email.com” -f ~/.ssh/id_rsa
Then you copy the public key to the server with this one command. It will create the authorized_keys file automatically.
$ ssh-copy-id -i ~/.ssh/id_rsa.pub username@server_ip_address
Chain these commands together like this.
$ eval $(ssh-agent -s); ssh-add /home/$USER/.ssh/id_rsa
Make sure you have sudo access, then lock the root account. It will add more security to your server.
$ sudo passwd -l root
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Here are some tips my friend.
Here is a better command to run to create the ssh key.
$ ssh-keygen -t rsa -b 4096 -C “brandon@example-email.com” -f ~/.ssh/id_rsa
Then you copy the public key to the server with this one command. It will create the authorized_keys file automatically.
$ ssh-copy-id -i ~/.ssh/id_rsa.pub username@server_ip_address
Chain these commands together like this.
$ eval $(ssh-agent -s); ssh-add /home/$USER/.ssh/id_rsa
Make sure you have sudo access, then lock the root account. It will add more security to your server.
$ sudo passwd -l root