How to scp in Python?
问题 What\'s the most pythonic way to scp a file in Python? The only route I\'m aware of is os.system(\'scp \"%s\" \"%s:%s\"\' % (localfile, remotehost, remotefile) ) which is a hack, and which doesn\'t work outside Linux-like systems, and which needs help from the Pexpect module to avoid password prompts unless you already have passwordless SSH set up to the remote host. I\'m aware of Twisted\'s conch , but I\'d prefer to avoid implementing scp myself via low-level ssh modules. I\'m aware of