ssh의 dsa 공개키를 이용 로그인

· 13년 전 · 1326
 dsa / rsa 키 생성
 
클라이언트 데스크탑
root@byoungguk-desktop:~# ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/root/.ssh/id_dsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /root/.ssh/id_dsa.
Your public key has been saved in /root/.ssh/id_dsa.pub.
The key fingerprint is:
x:x:x:.... root@byoungguk-desktop
The key's randomart image is:
+--[ DSA 1024]----+
|                 |
|           .     |
|        . +      |
|       . o o     |
....
+-----------------+
 
root@byoungguk-desktop:~# cd /root/.ssh/
root@byoungguk-desktop:~/.ssh# ls -al
합계 20
drwx------  2 root root 4096 2011-09-16 14:25 .
drwx------ 25 root root 4096 2011-09-15 11:28 ..
-rw-------  1 root root  672 2011-09-16 14:25 id_dsa
-rw-r--r--  1 root root  612 2011-09-16 14:25 id_dsa.pub
-rw-r--r--  1 root root  270 2010-07-23 12:28 known_hosts
 
 
파일중 id_dsa.pub 내용을 복사
 
 
접속하고자 하는 서버 계정에서 .ssh 디렉토리의 authorized_keys 파일에 추가함. 없으면 파일 만들고.
.ssh 디렉토리, authorized_keys 는 계정의 소유권으로 읽기,쓰기가능해야 한다.(0600)
 
접속 테스트
 
ssh xxx@ip
 
원격에서 명령 실행.
ssh xxx@ip df
 
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/xvda2             9920624   7767680   1640876  83% /
/dev/xvda1              101086     26739     69128  28% /boot
/dev/xvda4            18034160   8734112   8383944  52% /home
tmpfs                   262232         0    262232   0% /dev/shm
/dev/xvdc1            20635700   2980460  16607004  16% /data3
|
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

+
제목 글쓴이 날짜 조회
13년 전 조회 1,891
13년 전 조회 1,738
13년 전 조회 1,795
13년 전 조회 2,028
13년 전 조회 2,851
13년 전 조회 1,886
13년 전 조회 2,327
13년 전 조회 1,391
13년 전 조회 1,425
13년 전 조회 1,386
13년 전 조회 1,326
13년 전 조회 1,610
13년 전 조회 1,654
13년 전 조회 1,345
13년 전 조회 1,607
13년 전 조회 2,169
13년 전 조회 1,433
13년 전 조회 2,216
13년 전 조회 1,291
13년 전 조회 1,500
13년 전 조회 1,312
13년 전 조회 1,508
13년 전 조회 1,346
13년 전 조회 1,704
13년 전 조회 1,749
13년 전 조회 1,644
13년 전 조회 3,468
13년 전 조회 1,285
13년 전 조회 1,527
13년 전 조회 1,388
13년 전 조회 1,888
13년 전 조회 1,627
13년 전 조회 2,331
13년 전 조회 2,663
13년 전 조회 1,986
13년 전 조회 3,880
13년 전 조회 2,130
13년 전 조회 1,494
13년 전 조회 2,935
13년 전 조회 3,358
13년 전 조회 1,189
13년 전 조회 1,322
13년 전 조회 1,244
13년 전 조회 1,326
13년 전 조회 1,249
13년 전 조회 1,489
13년 전 조회 2,734
13년 전 조회 1,203
13년 전 조회 1,176
13년 전 조회 1,327
13년 전 조회 1,285
13년 전 조회 1,215
13년 전 조회 1,509
13년 전 조회 1,453
13년 전 조회 1,192
13년 전 조회 1,209
13년 전 조회 2,239
13년 전 조회 1,446
13년 전 조회 1,817
13년 전 조회 1,151
13년 전 조회 1,785
13년 전 조회 1,314
13년 전 조회 1,163
13년 전 조회 1,460
13년 전 조회 3,007
13년 전 조회 1,627
13년 전 조회 2,329
13년 전 조회 1,191
13년 전 조회 1,238
13년 전 조회 1,475
13년 전 조회 1,209
13년 전 조회 2,123
13년 전 조회 1,134
13년 전 조회 1,163
13년 전 조회 1,521
13년 전 조회 1,284
13년 전 조회 1,201
13년 전 조회 1,337
13년 전 조회 1,352
13년 전 조회 1,210
13년 전 조회 3,052
13년 전 조회 2,160
13년 전 조회 2,027
13년 전 조회 1,238
13년 전 조회 1,191
13년 전 조회 1,283
13년 전 조회 1,491
13년 전 조회 1,290
13년 전 조회 1,867
13년 전 조회 1,951
13년 전 조회 1,529
13년 전 조회 1,674
13년 전 조회 2,724
13년 전 조회 3,050
13년 전 조회 6,324
13년 전 조회 1,217
13년 전 조회 1,662
13년 전 조회 1,219
13년 전 조회 1,489
13년 전 조회 2,137