{"action":"opened","issue":{"url":"https://api.github.com/repos/paramiko/paramiko/issues/878","repository_url":"https://api.github.com/repos/paramiko/paramiko","labels_url":"https://api.github.com/repos/paramiko/paramiko/issues/878/labels{/name}","comments_url":"https://api.github.com/repos/paramiko/paramiko/issues/878/comments","events_url":"https://api.github.com/repos/paramiko/paramiko/issues/878/events","html_url":"https://github.com/paramiko/paramiko/issues/878","id":202222190,"number":878,"title":"paramiko.transport: EOF in transport thread","user":{"login":"abhinav0513","id":25253731,"avatar_url":"https://avatars.githubusercontent.com/u/25253731?v=3","gravatar_id":"","url":"https://api.github.com/users/abhinav0513","html_url":"https://github.com/abhinav0513","followers_url":"https://api.github.com/users/abhinav0513/followers","following_url":"https://api.github.com/users/abhinav0513/following{/other_user}","gists_url":"https://api.github.com/users/abhinav0513/gists{/gist_id}","starred_url":"https://api.github.com/users/abhinav0513/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abhinav0513/subscriptions","organizations_url":"https://api.github.com/users/abhinav0513/orgs","repos_url":"https://api.github.com/users/abhinav0513/repos","events_url":"https://api.github.com/users/abhinav0513/events{/privacy}","received_events_url":"https://api.github.com/users/abhinav0513/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-01-20T19:29:08Z","updated_at":"2017-01-20T19:29:08Z","closed_at":null,"body":"I am trying to pull logs from a router and getting the EOF exception: \r\n\r\nBelow is the code:\r\n\r\nimport paramiko\r\nimport os\r\nimport shutil\r\nimport datetime\r\nimport logging\r\n\r\nparamiko.util.log_to_file(\"filename.log\")\r\nparser = open(\"hostsIp.txt\",'r')\r\n) + \" \" + (str(datetime.datetime.today().day)))\r\n\r\nlog = logging.getLogger(\"paramiko.transport\").setLevel(1)\r\nif \"extractedData\" in os.listdir(\".\"):\r\n    shutil.rmtree(\"extractedData\")\r\n\r\nos.makedirs(\".//extractedData\")\r\nfor i in parser:\r\n    try:\r\n        print(i)\r\n        ssh = paramiko.SSHClient()\r\n        ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())\r\n        ssh.load_system_host_keys()\r\n        ssh.connect(i.strip(), username=\"condor1\", password=\"condor08\")\r\n        stdin, stdout, stderr = ssh.exec_command(\"term len 0\")\r\n        stdin1, stdout1, stderr1 = ssh.exec_command(\"admin show platform\")\r\n        stdin2, stdout2, stderr2 = ssh.exec_command(\"show redundancy\")\r\n        stdin3, stdout3, stderr3 = ssh.exec_command(\"show variables boot\")\r\n\r\n\r\n    except paramiko.SSHException as e:\r\n        print(e)\r\n        print(\"Unsuccessful Login\"+i)\r\n        print(log)\r\n\r\n\r\nHere are the logs:\r\nDEB [20170120-13:43:02.584] thr=1   paramiko.transport: starting thread (client mode): 0xc5037790L\r\nINF [20170120-13:43:02.638] thr=1   paramiko.transport: Connected (version 2.0, client Cisco-2.0)\r\nDEB [20170120-13:43:02.641] thr=1   paramiko.transport: kex algos:['diffie-hellman-group14-sha1', 'diffie-hellman-group1-sha1'] server key:['ssh-rsa'] client encrypt:['aes128-cbc', 'aes192-cbc', 'aes256-cbc', '3des-cbc'] server encrypt:['aes128-cbc', 'aes192-cbc', 'aes256-cbc', '3des-cbc'] client mac:['hmac-sha1'] server mac:['hmac-sha1'] client compress:['none'] server compress:['none'] client lang:[''] server lang:[''] kex follows?False\r\nDEB [20170120-13:43:02.641] thr=1   paramiko.transport: Ciphers agreed: local=aes128-cbc, remote=aes128-cbc\r\nDEB [20170120-13:43:02.641] thr=1   paramiko.transport: using kex diffie-hellman-group1-sha1; server key type ssh-rsa; cipher: local aes128-cbc, remote aes128-cbc; mac: local hmac-sha1, remote hmac-sha1; compression: local none, remote none\r\nDEB [20170120-13:43:02.804] thr=1   paramiko.transport: Switch to new keys ...\r\nDEB [20170120-13:43:03.008] thr=1   paramiko.transport: userauth is OK\r\nINF [20170120-13:43:03.126] thr=1   paramiko.transport: Authentication (password) successful!\r\nDEB [20170120-13:43:03.140] thr=2   paramiko.transport: [chan 1] Max packet in: 34816 bytes\r\nDEB [20170120-13:43:03.142] thr=1   paramiko.transport: [chan 1] Max packet out: 34816 bytes\r\nINF [20170120-13:43:03.142] thr=1   paramiko.transport: Secsh channel 1 opened.\r\nDEB [20170120-13:43:03.149] thr=1   paramiko.transport: [chan 1] Sesch channel 1 request ok\r\nDEB [20170120-13:43:03.150] thr=2   paramiko.transport: [chan 2] Max packet in: 34816 bytes\r\nDEB [20170120-13:43:03.153] thr=1   paramiko.transport: [chan 2] Max packet out: 34816 bytes\r\nINF [20170120-13:43:03.153] thr=1   paramiko.transport: Secsh channel 2 opened.\r\nDEB [20170120-13:43:03.235] thr=1   paramiko.transport: [chan 2] Sesch channel 2 request ok\r\nDEB [20170120-13:43:03.525] thr=1   paramiko.transport: [chan 1] EOF received (1)\r\nDEB [20170120-13:43:03.525] thr=1   paramiko.transport: [chan 1] EOF sent (1)\r\nDEB [20170120-13:43:03.940] thr=1   paramiko.transport: [chan 2] EOF received (2)\r\nDEB [20170120-13:43:03.941] thr=2   paramiko.transport: [chan 3] Max packet in: 34816 bytes\r\nDEB [20170120-13:43:03.942] thr=1   paramiko.transport: [chan 2] EOF sent (2)\r\nDEB [20170120-13:43:03.945] thr=1   paramiko.transport: EOF in transport thread\r\n\r\n\r\nIs there something that I am missing in the code?\r\n"}}
{"actor":{"display_login":"abhinav0513"}}