2013-02-25 2 views
0

Net::SFTP을 사용하여 파일을 전송하고 있습니다. 그러나 다음과 같이 새 객체를 만들려고 할 때마다 :Net :: SFTP Hangs

my $sftp = Net::SFTP->new('ip', user=>'user', password=>'pass'); 

그냥 멈추고 아무것도하지 않습니다. 아무도 이것이 왜 있는지 압니까? 내가 뭔가 잘못하고 있는거야? 감사!

dev1.com: Reading configuration data /home/user/.ssh/config 
dev1.com: Reading configuration data /etc/ssh_config 
dev1.com: Connecting to 50.56.91.91, port 22. 
dev1.com: Remote protocol version 2.0, remote software version OpenSSH_4.3 
dev1.com: Net::SSH::Perl Version 1.34, protocol version 2.0. 
dev1.com: No compat match: OpenSSH_4.3. 
dev1.com: Connection established. 
dev1.com: Sent key-exchange init (KEXINIT), wait response. 
dev1.com: Algorithms, c->s: 3des-cbc hmac-sha1 none 
dev1.com: Algorithms, s->c: 3des-cbc hmac-sha1 none 
dev1.com: Entering Diffie-Hellman Group 1 key exchange. 
dev1.com: Sent DH public key, waiting for reply. 
dev1.com: Received host key, type 'ssh-dss'. 
dev1.com: Host 'ip_here' is known and matches the host key. 
dev1.com: Computing shared secret key. 
dev1.com: Verifying server signature. 
dev1.com: Waiting for NEWKEYS message. 
dev1.com: Send NEWKEYS. 
dev1.com: Enabling encryption/MAC/compression. 
dev1.com: Sending request for user-authentication service. 
dev1.com: Service accepted: ssh-userauth. 
dev1.com: Trying empty user-authentication request. 
dev1.com: Authentication methods that can continue: publickey,gssapi-with mic,password. 
dev1.com: Next method to try is publickey. 
dev1.com: Trying pubkey authentication with key file '/home/user/.ssh/id_rsa2' 
+0

내가 연결하려고하고 요청이 귀가 먹은 귀에 떨어지고 있다고 상상해보십시오. 아마도 방화벽 문제일까요? – ikegami

+0

@ikegami하지만 명령 줄에서 ssh를 사용할 수 있다는 것이 있습니다. 그래서 아마 방화벽 문제가 아니라고 생각합니다. – srchulo

+0

암호를 무시하고 대신 공개 키를 사용하는 것처럼 보입니다. 명령 줄에서 연결할 때 암호를 제공합니까? '/ home/user/.ssh'의 내용이 맞습니까? – Borodin

답변

2

userpassword 옵션 외에도, debug => 1을 설정

업데이트 여기

디버그 출력됩니다. 문제가 무엇인지 알려주는 진단 결과가 나옵니다.

+0

제안에 감사드립니다. 위의 디버그 출력을 게시했습니다. – srchulo

2

연결 데이터가 정확한지 검색하십시오. Net::SFTP::Foreign에 표시된 것과 같은 간단한 코드를 사용하십시오.

+0

고마워요! 인터넷 :: SFTP :: 외국인 보이는 좋은 :) – srchulo