2017-12-06 24 views
-2

Stack Overflow 자체에는 몇 가지 유사한 질문이 있지만 아무 것도 작동하지 않습니다.scp 원격 서버에 인증 된 키에 공개 키를 추가 했음에도 불구하고 암호를 묻습니다.

remote이라는 서버가 있는데 내 local 컴퓨터에서 일부 파일을 복사하려고합니다. 둘 다 우분투 기계입니다 : local 우분투 16과 remote 우분투 (14)

내가 ~/.ssh/authorized_keys에서 remote 서버에 내 local 공개 키를 추가 한 것입니다. 키를 추가하기 전에 원격 컴퓨터에 대한 암호를 묻는 메시지가 표시되었지만 지금은 키 암호를 묻는 메시지가 표시됩니다.

는 원격 시스템 내 권한이 있습니다

drwx------ 2 ops ops 4096 Dec 5 07:38 . 
drwxr-xr-x 5 ops ops 4096 Dec 6 02:06 .. 
-rwx------ 1 ops ops 743 Dec 5 03:56 authorized_keys 
-rw------- 1 ops ops 3326 Dec 5 04:04 id_rsa 
-rw-r--r-- 1 ops ops 751 Dec 5 04:04 id_rsa.pub 
-rwx------ 1 ops ops 444 Dec 5 06:55 known_hosts 

이 내 자세한 ssh를 로그입니다 :

OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g 1 Mar 2016 
debug1: Reading configuration data /etc/ssh/ssh_config 
debug1: /etc/ssh/ssh_config line 19: Applying options for * 
debug1: Connecting to gateway [172.16.24.1] port 22. 
debug1: Connection established. 
debug1: identity file /home/ops/.ssh/id_rsa type 1 
debug1: key_load_public: No such file or directory 
debug1: identity file /home/ops/.ssh/id_rsa-cert type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /home/ops/.ssh/id_dsa type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /home/ops/.ssh/id_dsa-cert type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /home/ops/.ssh/id_ecdsa type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /home/ops/.ssh/id_ecdsa-cert type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /home/ops/.ssh/id_ed25519 type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /home/ops/.ssh/id_ed25519-cert type -1 
debug1: Enabling compatibility mode for protocol 2.0 
debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.2 
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.7 
debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.7 pat OpenSSH_6.6.1* compat 0x04000000 
debug1: Authenticating to gateway:22 as 'ops' 
debug1: SSH2_MSG_KEXINIT sent 
debug1: SSH2_MSG_KEXINIT received 
debug1: kex: algorithm: [email protected] 
debug1: kex: host key algorithm: ecdsa-sha2-nistp256 
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none 
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none 
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY 
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:TgaQlbi1L+JBQBbqhJZHIpDnXtJGZtw5y3r2fj7qFAM 
debug1: Host 'gateway' is known and matches the ECDSA host key. 
debug1: Found key in /home/ops/.ssh/known_hosts:2 
debug1: rekey after 134217728 blocks 
debug1: SSH2_MSG_NEWKEYS sent 
debug1: expecting SSH2_MSG_NEWKEYS 
debug1: rekey after 134217728 blocks 
debug1: SSH2_MSG_NEWKEYS received 
debug1: SSH2_MSG_SERVICE_ACCEPT received 
debug1: Authentications that can continue: publickey,password 
debug1: Next authentication method: publickey 
debug1: Offering RSA public key: /home/ops/.ssh/id_rsa 
debug1: Server accepts key: pkalg ssh-rsa blen 535 
Enter passphrase for key '/home/ops/.ssh/id_rsa': 

사람이에 도움을 주시기 바랍니다 수 있습니다.

+1

나는이 프롬프트가 _local_ 개인 키의 암호문에 해당한다고 생각합니다. SSH 연결을 위해 키를 해독하고 핸드 쉐이킹 프로세스를 시작해야합니다. 로컬 시스템에서 키를 생성 할 때 설정했을 수 있습니다. –

+0

예 'local'에 대한 키를 생성하는 동안 암호를 설정했습니다. 암호없이 다시 생성해야합니까? 비슷한 방식으로 다른 시스템을 설정하기 때문에 이것이 문제가 아니라고 생각합니다. –

+0

암호를 사용하지 않고 키를 다시 생성했습니다. 이제이 키가 작동합니다. 감사 . –

답변

0

키가 비밀번호로 보호되어 있는지 확실히 확인하십시오. 서버에 로그인하지 않으면 잠금을 해제하라는 메시지가 표시됩니다.