October 12

make key and it to remote server for backups

mkdir -pv ~/.ssh;ssh-keygen -t rsa -b 2048 -C "$(whoami)@$(hostname)-$(date -I)" -f ~/.ssh/"$(whoami)"
chmod 600 ~/.ssh/"$(whoami)".pub
ssh-copy-id -i ~/.ssh/"$(whoami)".pub user_name@server_ip
ssh -i ~/.ssh/"$(whoami)" user_name@server_ip

or manually add it to host under user:

mkdir -pv /home/key_name/.ssh/ && nano /home/key_name/.ssh/authorized_keys && chown -Rv key_name:key_name /home/key_name/.ssh


Copyright 2021. All rights reserved.

Posted 12 October 2016 by admin in category "simple memo

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.