|
|
|
|
|
À̸§ : È£¼® (220.¢½.198.142) |
|
³¯Â¥ : 2007-06-18 22:27:20 |
|
Á¦¸ñ : ssh ·Î±×ÀÎ ¾øÀÌ ÀÚµ¿À¸·Î Á¢¼ÓÇÏ´Â ¹æ¹ý |
|
¹é¾÷À̳ª ¾÷¹«»ó ÆíÀǸ¦ À§Çؼ Æнº¿öµå ÀԷ¾øÀÌ ÀÚµ¿À¸·Î ·Î±×ÀÎÇÏ´Â ¹æ¹ý¿¡ ´ëÇØ ¾Ë¾Æº¸ÀÚ.
¹æ¹ý1>>>>>
$ ssh-keygen -t dsa
$ ssh raclinux1 "cat ~/.ssh/id_dsa.pub" >> ~/.ssh/authorized_keys
¹æ¹ý2>>>>>
¼¹ö(junix)¿¡¼ ºñ¹ÐÅ° ÀÛ¼º
[root@junix ~]# ssh-keygen -b 1024 -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase): <- ±×³É Enter Å°¸¦ Ä£´Ù.(¾Æ¹«°Íµµ ÀԷ¾ÈÇÑ´Ù)
Enter same passphrase again: <- ±×³É Enter Å°¸¦ Ä£´Ù.(¾Æ¹«°Íµµ ÀԷ¾ÈÇÑ´Ù)
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
e0:62:99:ad:99:23:e1:d2:0a:cd:4e:24:7d:12:85:d5 root@junix.pe.kr
¼¹ö(junix)ÀÇ °ø°³Å°¸¦ Ŭ¶óÀ̾ðÆ®(soojung)¿¡ º¹»çÇÕ´Ï´Ù.
[root@junix ~]# scp .ssh/id_rsa.pub soojung:/root
The authenticity of host 'soojung (192.168.0.3)' can't be established.
RSA key fingerprint is 34:25:cf:51:41:47:c4:f6:94:f6:dd:44:88:e5:cd:a5.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'soojung,192.168.0.3' (RSA) to the list of known hosts.
root@soojung's password:
id_rsa.pub 100% 226 0.2KB/s 00:00
Ŭ¶óÀ̾ðÆ®(soojung)¿¡¼ ¼¹ö(junix)ÀÇ °ø°³Å°·Î /root/.ssh/authorized_keys ¸¦ ÀÛ¼ºÇÕ´Ï´Ù.
[root@soojung .ssh]# cat id_rsa.pub >> /root/.ssh/authorized_keys
| |
|
|
È£¼® |
|
|
|
A ¼¹ö¿¡¼ -> B ¼¹ö·Î ÀÚµ¿·Î±×ÀΠó¸®
1) ¹æ¹ý2 ¸¦ A¼¹ö¿¡¼ ½ÇÇàÇϸéµÊ
# ssh-keygen -b 1024 -t rsa
# scp .ssh/id_rsa.pub B¼¹ö:/dir
# cat id_rsa.pub >> .ssh/authorized_keys |
08-05-23 14:33
121.¢½.39.7
|
|
|
È£¼® |
|
|
|
132 ¹ø ¾ÆÀÌÇǴ ƯÀÌÇÏ°Ô ksh ·Î µÇ¾î¾ß °ø°³Å°°¡ Àû¿ëµÇ´Â Çö»óÀÌ ÀÖ¾úÀ½
°èÁ¤À» ksh ·Î Àû¿ëÇÏ°í ÇϸéµÊ 132 ¼¹ö |
09-07-08 22:42
220.¢½.198.178
|
|
|
È£¼® |
|
|
|
A ¼¹ö¿¡¼ -> B ¼¹ö·Î ÀÚµ¿·Î±×ÀΠó¸®
A¼¹öÀÇ id_rsa.pub ¸¦ B¼¹ö·Î Àü¼ÛÈÄ B¼¹ö¿¡¼ authorized_keys ¿¡ Ãß°¡ÇÑ´Ù.
1) ¹æ¹ý2 ¸¦ A¼¹ö¿¡¼ ½ÇÇàÇϸéµÊ
A¼¹ö ==>
# ssh-keygen -b 1024 -t rsa
# scp .ssh/id_rsa.pub B¼¹ö:/dir
B¼¹ö ==>
# cat id_rsa.pub >> .ssh/authorized_keys |
10-07-29 09:37
121.¢½.39.7
|
|
|
È£¼® |
|
|
|
ÀϹݰèÁ¤À¸·ÎÇϸé ÀÚµ¿·Î±×ÀÎÀÌ ¾ÈµÉ°æ¿ì
$ chmod 700 authorized_keys
¸¸¾à º¯°æÇÏÁö ¾Ê°í SSHÁ¢¼ÓÀ» ½ÃµµÇÏ¸é ¾Æ·¡ ·Î±×¿Í °°ÀÌ ¿¡·¯°¡ ¹ß»ýÇÕ´Ï´Ù.
/var/log/secure
Aug 15 09:41:06 localhost sshd[3604]: Authentication refused: bad ownership or modes for
file /home/yourid/.ssh/authorized_keys |
11-05-12 18:23
121.¢½.39.7
|
|
|