Forums

send a file to pythonanywhere by curl sftp

Hi,

I am trying to send a simple file to my count pythonanywhere using curl an sftp protocol.

which is te right way to do that? I even try these commands and didnt have success...

curl  -k "sftp://wakimsaba@ssh.pythonanywhere.com" --user "myuser:mypasswd"  -T "teste.txt"
curl  -k "sftp://wakimsaba@ssh.pythonanywhere.com:22" --user "myuser:mypasswd"  -T "teste.txt"
curl  -k "sftp://ssh.pythonanywhere.com:22" --user "myuser:mypasswd"  -T "teste.txt"

Best regards!!

wakim

[formatted by admin]

Hi, try this command:

curl -k 'sftp://wakimsaba@ssh.pythonanywhere.com/home/wakimsaba/' --user 'wakimsaba:yourpasswd' -T 'teste.txt'

Hi,

Unfortuntely the answer is te same:

% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 About to connect() to ssh.pythonanywhere.com port 22 (#0) * Trying 23.21.200.247... * Connected to ssh.pythonanywhere.com (23.21.200.247) port 22 (#0) * Failure establishing ssh session 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 * Closing connection 0 curl: (2) Failure establishing ssh session*

I can see successful logins coming in for your account, from a number of different IP addresses, so it looks like there's no connection issues there. Can you SSH into our site using the ssh command?

Yes, I can SSH into pythonanywhere.

I solved it using scp, with a command like this:

sshpass -p 'mypasswd' scp my_file.zip wakimsaba@ssh.pythonanywhere.com:/home/wakimsaba/

Thank you for helping, guys!!

Thanks for letting us know!