Home | 简体中文 | 繁体中文 | 杂文 | Search | ITEYE 博客 | OSChina 博客 | Facebook | Linkedin | 知乎专栏 | Email

40.8. OpenSSH for Windows

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

40.8.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

comments powered by Disqus