当尝试连接到数字海洋时,Paramiko将无法工作

2024-09-26 21:47:27 发布

您现在位置:Python中文网/ 问答频道 /正文

我用SSH键进入数字海洋。生成命令行..它起作用了

ssh root@111.111.111.111

The authenticity of host 111.111.111.111 (111.111.111.111)' can't be established.
ECDSA key fingerprint is 7f:89:a8:ff:ca:de:5a:30:b9:a1:ff:6a:d6:91:90:4b.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '111.111.111.111' (ECDSA) to the list of known hosts.
Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-virtual x86_64)

 * Documentation:  https://help.ubuntu.com/
Last login: Fri Jul 19 19:54:48 2013 from 111.111.111.111

当使用paramiko时,它会永远挂起

^{pr2}$

那么..为什么paramiko不能用id\u rsa密钥来做呢?我对ec2pem文件和相同的代码没有问题。在

DEBUG:paramiko.transport:starting thread (client mode): 0x1fc5610L
INFO:paramiko.transport:Connected (version 2.0, client OpenSSH_5.9p1)
DEBUG:paramiko.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', 'ecdsa-sha2-nistp256'] client encrypt:['aes128-ctr', 'aes192-ctr', 'aes256-ctr', 'arcfour256', 'arcfour128', 'aes128-cbc', '3des-cbc', 'blowfish-cbc', 'cast128-cbc', 'aes192-cbc', 'aes256-cbc', 'arcfour', 'rijndael-cbc@lysator.liu.se'] server encrypt:['aes128-ctr', 'aes192-ctr', 'aes256-ctr', 'arcfour256', 'arcfour128', 'aes128-cbc', '3des-cbc', 'blowfish-cbc', 'cast128-cbc', 'aes192-cbc', 'aes256-cbc', 'arcfour', 'rijndael-cbc@lysator.liu.se'] client mac:['hmac-md5', 'hmac-sha1', 'umac-64@openssh.com', 'hmac-sha2-256', 'hmac-sha2-256-96', 'hmac-sha2-512', 'hmac-sha2-512-96', 'hmac-ripemd160', 'hmac-ripemd160@openssh.com', 'hmac-sha1-96', 'hmac-md5-96'] server mac:['hmac-md5', 'hmac-sha1', 'umac-64@openssh.com', 'hmac-sha2-256', 'hmac-sha2-256-96', 'hmac-sha2-512', 'hmac-sha2-512-96', 'hmac-ripemd160', 'hmac-ripemd160@openssh.com', 'hmac-sha1-96', 'hmac-md5-96'] client compress:['none', 'zlib@openssh.com'] server compress:['none', 'zlib@openssh.com'] client lang:[''] server lang:[''] kex follows?False
DEBUG:paramiko.transport:Ciphers agreed: local=aes128-ctr, remote=aes128-ctr
DEBUG:paramiko.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:paramiko.transport:Switch to new keys ...
DEBUG:paramiko.transport:Adding ssh-rsa host key for 192.241.198.138: a1f959beaa5227e98239face34cdfd74
DEBUG:paramiko.transport:Trying SSH key f3b35cd0d539efed90a8665bff9b905b

Tags: keydebugcomclientparamikoserverhmacsha1

热门问题