{"action":"opened","issue":{"url":"https://api.github.com/repos/paramiko/paramiko/issues/690","repository_url":"https://api.github.com/repos/paramiko/paramiko","labels_url":"https://api.github.com/repos/paramiko/paramiko/issues/690/labels{/name}","comments_url":"https://api.github.com/repos/paramiko/paramiko/issues/690/comments","events_url":"https://api.github.com/repos/paramiko/paramiko/issues/690/events","html_url":"https://github.com/paramiko/paramiko/issues/690","id":134410213,"number":690,"title":"When using paramiko.client.exec_command() to send a command longer than 256 characters the command gets garbled.","user":{"login":"thexder1","id":7649504,"avatar_url":"https://avatars.githubusercontent.com/u/7649504?v=3","gravatar_id":"","url":"https://api.github.com/users/thexder1","html_url":"https://github.com/thexder1","followers_url":"https://api.github.com/users/thexder1/followers","following_url":"https://api.github.com/users/thexder1/following{/other_user}","gists_url":"https://api.github.com/users/thexder1/gists{/gist_id}","starred_url":"https://api.github.com/users/thexder1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thexder1/subscriptions","organizations_url":"https://api.github.com/users/thexder1/orgs","repos_url":"https://api.github.com/users/thexder1/repos","events_url":"https://api.github.com/users/thexder1/events{/privacy}","received_events_url":"https://api.github.com/users/thexder1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-17T21:45:28Z","updated_at":"2016-02-17T21:45:28Z","closed_at":null,"body":"I have not been able to figure out exactly what happens to the command when it is longer than 256 characters, but either the first characters start getting dropped or the entire command gets garbled.\r\n\r\nIn my test case I am sending a command to add an ssh key to a remote system (the ssh key is included in the command line) and once I hit 257 characters or more I get an error saying the command is invalid, but 256 or less I just get a bad ssh key because it is cut off.\r\n\r\nIt works fine if I send everything using paramiko.client.invoke_shell() then use channel.send() over the channel created from that."}}