User Tools

Site Tools


linux:ssh

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
linux:ssh [2014/12/20 05:58] percylinux:ssh [2014/12/20 06:03] percy
Line 13: Line 13:
      
   http://riny.net/2014/git-ssh-key/   http://riny.net/2014/git-ssh-key/
 +  
 +===== ssh key generate =====
 +  Apps-iMac:.ssh pengjianqing$ ssh-keygen -t rsa -C "pengjianqing@gmail.com"
 +<code>
 +Generating public/private rsa key pair.
 +Enter file in which to save the key (/Users/pengjianqing/.ssh/id_rsa): digitalocean_rsa
 +Enter passphrase (empty for no passphrase):
 +Enter same passphrase again:
 +Your identification has been saved in digitalocean_rsa.
 +Your public key has been saved in digitalocean_rsa.pub.
 +The key fingerprint is:
 +ec:aa:66:48:07:e0:91:53:73:2b:e9:14:c0:f6:ca:d5 pengjianqing@gmail.com
 +The key's randomart image is:
 ++--[ RSA 2048]----+
 +|..++ .           |
 +|.*  = .          |
 +|o.++..           |
 +| .+o.E .         |
 +|. oo    S        |
 +| o. .  .         |
 +| . o    .        |
 +|  . o  .         |
 +|   o...          |
 ++-----------------+
 +</code>
 +
 +Then get the pub key
 +  cat digitalocean_rsa.pub
 +
 +Add it to the server side
 +  root@pjq:~# vim ~/.ssh/authorized_keys
      
 ====== multiple ssh keys ====== ====== multiple ssh keys ======
Line 24: Line 55:
     User root     User root
 </code> </code>
- 
/var/www/dokuwiki/wiki/data/pages/linux/ssh.txt · Last modified: 2017/12/15 13:22 by percy