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 … Read more

Is there a WinSCP equivalent for Linux? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. We don’t allow questions about general computing hardware and software on Stack Overflow. You can edit the question so it’s on-topic for Stack Overflow. Closed 7 years ago. Improve this question I love WinSCP for Windows. What is the best … Read more

Using scp to copy a file to Amazon EC2 instance?

I am trying to use my Mac Terminal to scp a file from Downloads (phpMyAdmin I downloaded online) to my Amazon EC2 instance. The command I used was: scp -i myAmazonKey.pem phpMyAdmin-3.4.5-all-languages.tar.gz [email protected]:~/. The error I got: Warning: Identity file myAmazonKey.pem not accessible: No such file or directory. Permission denied (publickey). lost connection Both my … Read more

How do I escape spaces in path for scp copy in Linux?

I’m new to linux, I want to copy a file from remote to local system… now I’m using scp command in linux system.. I have some folders or files names are with spaces, when I try to copy that file, it shows the error message: “No such file or directory” I tried: scp [email protected]:’/home/5105/test/gg/Untitled Folder/a/qy.jpg’ … Read more

scp (secure copy) to ec2 instance without password

I have an EC2 instance running (FreeBSD 9 AMI ami-8cce3fe5), and I can ssh into it using my amazon-created key file without password prompt, no problem. However, when I want to copy a file to the instance using scp I am asked to enter a password: scp somefile.txt -i mykey.pem [email protected]:/ Password: Any ideas why … Read more

Transferring files over SSH [closed]

Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Overflow. Closed 10 years ago. Improve this question I’m SSHing into a remote server on the command line, and trying to copy a directory onto my local machine with the scp … Read more