SSH


blog.udartsev.ru

SSH key to server

SSH => server

Create a key:

ssh-keygen -t rsa

Copy it to the server:

ssh-copy-id -i ./mainserver.pub archive@5.45.79.2

OR

ssh archive@5.45.79.2 "chmod 700 .ssh; chmod 640 .ssh/authorized_keys"

cat ./mainserver.pub | ssh archive@5.45.79.2 'cat >> .ssh/authorized_keys'

OR

ssh -i /root/.ssh/mainserver.pub archive@5.45.79.2