I\'ve been trying to write a small library using Thor to help assist me in quick creating new projects and sites. I wrote this small method:
def ssh(cmd)
The first thing you might want to try is using public keys instead of passwords to login. Then also try running the command from the interactive shell.
For example:
(This part really depends on the server/client software you have)
$ ssh-keygen
$ scp .ssh/id-dsa.pub server:
$ ssh server
server$ cat id-dsa.pub >> .ssh/authorizedkeys
$ scp -c "ls"
this should work without any prompts, if the key sharing was successful.