2012-07-28 3 views
0

가능한 중복 : 내 우화에서
Using an SSH keyfile with Fabric직물 키 SSH를 사용하지 않는

env.ip = 'x.x.x.x' 
env.hosts = [env.ip] 
env.user = 'root' 
env.environment = 'production' 

나는이 같은 설정을 가지고 있지만 때 나는 실행하려고 뭔가를 실행 (명령)을 사용하여, 내가 루트에 대한 암호를 넣어 묻습니다, 왜?

내 터미널 Terminal.app에서 암호를 입력하지 않고 x.x.x.x ssh를 실행할 수 있습니다. 내가 여기 fabfile에서 로깅을 활성화하고있다

는 OUPUT 당신이 사용하는 키 파일의 경로를 지정해야

DEBUG:ssh.transport:starting thread (client mode): 0xaa84dd0L 
INFO:ssh.transport:Connected (version 2.0, client OpenSSH_5.8p1) 
DEBUG:ssh.transport:kex algos:['ecdh-sha2-nistp256', 'ecdh-sha2-nistp384', 'ecdh-sha2-nistp521', 'diffie-hellman-group-exchange-sha256', 'diffie-hellman-group-exchange-sha1', 'diffie-hellman-group14-sha1', 'diffie-hellman-group1-sha1'] server key:['ssh-rsa', 'ssh-dss'] client encrypt:['aes128-ctr', 'aes192-ctr', 'aes256-ctr', 'arcfour256', 'arcfour128', 'aes128-cbc', '3des-cbc', 'blowfish-cbc', 'cast128-cbc', 'aes192-cbc', 'aes256-cbc', 'arcfour', '[email protected]'] server encrypt:['aes128-ctr', 'aes192-ctr', 'aes256-ctr', 'arcfour256', 'arcfour128', 'aes128-cbc', '3des-cbc', 'blowfish-cbc', 'cast128-cbc', 'aes192-cbc', 'aes256-cbc', 'arcfour', '[email protected]'] client mac:['hmac-md5', 'hmac-sha1', '[email protected]', 'hmac-ripemd160', '[email protected]', 'hmac-sha1-96', 'hmac-md5-96'] server mac:['hmac-md5', 'hmac-sha1', '[email protected]', 'hmac-ripemd160', '[email protected]', 'hmac-sha1-96', 'hmac-md5-96'] client compress:['none', '[email protected]'] server compress:['none', '[email protected]'] client lang:[''] server lang:[''] kex follows?False 
DEBUG:ssh.transport:Ciphers agreed: local=aes128-ctr, remote=aes128-ctr 
DEBUG:ssh.transport:using kex diffie-hellman-group1-sha1; server key type ssh-rsa; cipher: local aes128-ctr, remote aes128-ctr; mac: local hmac-sha1, remote hmac-sha1; compression: local none, remote none 
DEBUG:ssh.transport:Switch to new keys ... [x.x.x.x] Login password for 'root': 

답변

1

입니다.

는 귀하의 경우

env.key_filename = '/path/to/keyfile.pem' 

를 추가로 졸이다 세부 사항에 대한 this post를 참조하십시오.

+0

문제가 해결되었지만 시스템의 기본 동작을 사용하지 않는 이유는 무엇입니까? 동일한 코드가 내 창에서 작동했기 때문에 (내 창에는 ssh 등이 있습니다.) 내 열쇠가 어디에 있는지 지정할 필요가 없습니다. – user469652

+0

Windows에서 다르게 작동하는 이유를 모르지만 키 파일의 경로를 명시 적으로 지정해야하는 경우는 드뭅니다. 모든 것이 매우 명시 적이어야하는 경우 예기치 않은 동작이 덜 일어나며 정기적 인 SSH 사용과 프로그래밍 방식에 대해 별도의 키를 사용하는 것이 용이합니다. – blahdiblah

관련 문제