ssh-key
دوشنبه, ۲۹ فروردين ۱۴۰۱، ۰۱:۱۹ ب.ظ
1- sudo apt-get install openssh-client
2- ssh-keygen -t rsa
. Enter file in which to save the key (/home/user/.ssh/id_rsa)
. Enter passphrase (empty for no passphrase) # can donot use passphrass
. Enter same passphrase again
3- check :
. Public Key: /home/user/.ssh/id_rsa.pub
. Private Key: /home/user/.ssh/id_rsa
4- ssh-copy-id user@YourServerIPAddress
or
cat ~/.ssh/id_rsa.pub | ssh User@YourServerIPAddress “mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys”
or
scp /home/user/.ssh/id_rsa.pub user@YourServerIPAddress:/home/user/.ssh
- ۰۱/۰۱/۲۹