SSH Key - Still asking for password and passphrase

后端 未结 30 1423
孤街浪徒
孤街浪徒 2020-11-27 08:35

I\'ve been somewhat \'putting up\' with Github always asking for my username and password when I clone a repository. I want to bypass this step because it is an annoyance w

30条回答
  •  野性不改
    2020-11-27 09:09

    Generally, here are the steps to allow you make a remote connection to your server using ssh without password:

    • Create a pair of rsa private and public key

      $ ssh-keygen -t rsa -b 4096 -C "your comments"
      
    • Copy your public key and login to your remote server

    • Add your public key to .ssh/authorized_keys

    • If you have multiple ssh keys in your computer you might to add your key using ssh-add

      $ ssh-add /path/to/private/key

    • Then try ssh to your server

      $ ssh username@your_ip_address

    Source: http://diary-of-programmer.blogspot.com/2018/08/tips-how-to-ssh-to-your-digitalocean.html

提交回复
热议问题