ssh을 이용한 원격서버 비밀번호 없이 로그인
rocal: local server
remote: remote server
1. 로컬서버
local> ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/harrison/.ssh/id_dsa): [Enter]
^^^^^^^
Enter passphrase (empty for no passphrase): [Enter]
^^^^^^^
Enter same passphrase again: [Enter]
^^^^^^^
Your identification has been saved in /home/harrison/.ssh/id_dsa.
Your public key has been saved in /home/harrison/.ssh/id_dsa.pub.
The key fingerprint is:
d5:d9:48:3f:7f:7f:5e:69:0a:94:5f:0f:aa:7d:d3:be harrison@my.sv.co.kr
2. 원격서버
remote> ssh-keygen -t dsa
remote> scp local:~/.ssh/id_dsa.pub .ssh/authorized_keys
remote> chmod 600 .ssh/authorized_keys
3. 테스트
local> ssh remote
rocal: local server
remote: remote server
1. 로컬서버
local> ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/harrison/.ssh/id_dsa): [Enter]
^^^^^^^
Enter passphrase (empty for no passphrase): [Enter]
^^^^^^^
Enter same passphrase again: [Enter]
^^^^^^^
Your identification has been saved in /home/harrison/.ssh/id_dsa.
Your public key has been saved in /home/harrison/.ssh/id_dsa.pub.
The key fingerprint is:
d5:d9:48:3f:7f:7f:5e:69:0a:94:5f:0f:aa:7d:d3:be harrison@my.sv.co.kr
2. 원격서버
remote> ssh-keygen -t dsa
remote> scp local:~/.ssh/id_dsa.pub .ssh/authorized_keys
remote> chmod 600 .ssh/authorized_keys
3. 테스트
local> ssh remote