ssh 공개키,비밀키
글쓴이: puaxx / 작성시간: 월, 2006/05/15 - 9:51오전
주기적으로 타 호스트의 파일을가져와야 되는데요..
scp를 이용할 생각인데...비밀번호가 그대로 노출되어서 찝찝하더라구요..
그래서 rsa 공개키,비밀키를 생성해서 타 호스트에 공개키를 업로드 하고 접속했는데 passphrase를 물어보지 않고 암호만 계속 물어 보네요..
아래와 같이 했었습니다..
$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/puaxx/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):*******
Enter same passphrase again:*******
Your identification has been saved in /home/puaxx/.ssh/id_rsa.
Your public key has been saved in /home/puaxx/.ssh/id_rsa.pub.
$ scp /home/puaxx/.ssh/id_rsa.pub puaxx@otherhost.mylocal.com:/home/puaxx/.ssh/authorized_keys
이후에 otherhost.mylocal.com으로 scp하면 passphrase를 물어봐야 되는데...여전히 암호만을 물어보는데...이거 왜 이럴까요?
Forums:
혹시나 해서 추측을
혹시나 해서 추측을 해봅니다.
authorized_keys 파일의 권한이 644 맞나요?
파일의 권한에 문제가 있어도 정사 작동을 안하더라구요.. :)
-----------------
한글을 사랑합니다.
-----------------
한글을 사랑합니다.
네 644 맞습니다.
네 644 맞구요..
혹시 ssh_config의 영향을 받는건가요?
# ForwardX11 no
# RhostsAuthentication no
# RhostsRSAAuthentication no
# RSAAuthentication yes
PasswordAuthentication yes
# HostbasedAuthentication no
# BatchMode no
# CheckHostIP no
# StrictHostKeyChecking ask
# IdentityFile ~/.ssh/identity
# IdentityFile ~/.ssh/id_rsa
# IdentityFile ~/.ssh/id_dsa
# Port 22
위는 클라이언트 호스트쪽의 ssh_config의 일부입니다.서버쪽 호스트도 설정이 아마 똑같을 텐데...조언 부탁 드리겠습니다.
.ssh 디렉터리와
.ssh 디렉터리와 .ssh/authorized_keys 파일 모두 group/other의 쓰기 권한이 없어야 한다는 제한이 있습니다. 한번 확인해 보시는 것도 좋을 것 같습니다.
덧. 이런, 늦었군요;;
----
$PWD `date`
$PWD `date`
PasswordAuthentication
PasswordAuthentication yes
말 그대로 패스워드로 인증한다는거 아닌가요?
제가 사용하는 서버에는 주석처리 되어있습니다.
저녀석을 주석처리 해보시겠습니까?
-----------------
한글을 사랑합니다.
-----------------
한글을 사랑합니다.
에힝 젠장..
사내 규정상 안된다는군요..어쭐수 없죠..뭐..ㅋㅋ
댓글 달기