Home | 簡體中文 | 繁體中文 | 雜文 | 知乎專欄 | Github | OSChina 博客 | 雲社區 | 雲棲社區 | Facebook | Linkedin | 視頻教程 | 打賞(Donations) | About
知乎專欄多維度架構 微信號 netkiller-ebook | QQ群:128659835 請註明“讀者”

42.9. OpenSSH for Windows

homepage: http://sshwindows.sourceforge.net/

42.9.1. Putty Client

  1. config /etc/ssh/sshd_config

    					
    $ sudo vim /etc/ssh/sshd_config
    
    AuthorizedKeysFile  %h/.ssh/authorized_keys
    
    $ sudo /etc/init.d/ssh reload
    					
    					
  2. ssh-keygen

    					
    neo@master:~$ ssh-keygen
    Generating public/private rsa key pair.
    Enter file in which to save the key (/home/neo/.ssh/id_rsa):
    Enter passphrase (empty for no passphrase):
    Enter same passphrase again:
    Your identification has been saved in /home/neo/.ssh/id_rsa.
    Your public key has been saved in /home/neo/.ssh/id_rsa.pub.
    The key fingerprint is:
    98:35:81:56:fd:b5:87:e4:94:e4:54:b8:b9:0a:4e:80 neo@master
    					
    					
  3. authorized_keys

    					
    $ mv .ssh/id_rsa.pub .ssh/authorized_keys
    					
    					

    or

    					
    $ cat .ssh/id_rsa.pub > .ssh/authorized_keys
    					
    					
  4. PuTTYgen

    Load an existing private key file

    to click 'Load' button and then open 'id_rsa'

    'Save public key' and 'Save private key'

    closing PuTTYgen

  5. Pageant

    opening Pageant

    to click mouse right key and then select 'Add Key', opening above private key.

  6. Putty

    Host Name: your ip address

    Connection -> Data -> Auto-login username: your username

    Connection -> SSH -> Auth -> Allow agent forwarding, you must checked it

    Now, You may click 'Open' to login linux system