假设 A （192.168.1.1）为客户机器(Client)，B（192.168.1.2）为目标机(Server)；
Step 1: 在Client (192.168.1.1) 创建 Authentication SSH-Kegen Keys
First login into client 192.168.1.1 with user edwin and generate a pair of public keys using following command.
Generating public/private rsa key pair.
Step 2: Copy the public key to remote-host
Copy the public key to remote-host using ssh-copy-id
Use SSH from server 192.168.1.1 to connect server 192.168.1.2 using robert as user and create .ssh directory under it, using following command.
The authenticity of host ‘192.168.1.2 (192.168.1.2)’ can’t be established.
上传公共 Keys到 Server (192.168.1.2)
Use SSH from Client 192.168.1.1 and upload new generated public key (id_rsa.pub) on server 192.168.1.2 under robert‘s .ssh directory as a file name authorized_keys.
在 Server （192.168.1.2）设置权限
Due to different SSH versions on servers, we need to set permissions on .ssh directory and authorized_keys file.
Step 3: 测试
From now onwards you can log into 192.168.1.2 as robert user from server 192.168.1.1 as tecmint user without password.
- [ January 30, 2018 ] How to install and config Termux on Android 5.x or later
- [ January 30, 2018 ] Automatically enable HTTPS on your website with EFF's Certbot
- [ January 29, 2018 ] Wireless network management in Raspberry Pi
- [ January 28, 2018 ] Install pycharm by Ubuntu make
- [ December 22, 2016 ] Deploying Django Apps with mod_wsgi on Ubuntu 16.04
- [ December 19, 2016 ] Top Things to do after Ubuntu 16.04 Installation
- [ December 19, 2016 ] Setting up Vim for Python
- [ December 19, 2016 ] PHP5.2 Parse error: syntax error, unexpected T_FUNCTION
- [ December 19, 2016 ] Automatically enable HTTPS on your website with EFF's Certbot
- [ December 15, 2016 ] How to install php5.6 on Ubuntu 16.04