Can someone help me with commands? I'm trying to upload file to server based on linux.
Asked
Active
Viewed 2.5e+01k times
83
-
Please clarify if the question is specifically about putty or if answers about any method for uploading via scp is fine. – Alexander Dec 06 '14 at 21:40
-
@Alexander, it is specifically about PuTTY. – anatoly techtonik Dec 08 '14 at 19:52
-
PuTTY seems to be both "the PuTTY project" (in lack of a better term) and the name of a specific executable/client named PuTTY, which is part of "the PuTTY project". Which do you mean? Are answers involving pscp on topic? And wich OS are you on? Are you trying to upload multiple files or a single file? What have you already tried? – Alexander Dec 08 '14 at 22:31
-
1@Alexander, the question is from person who is using PuTTY, trying to find a way to upload file. See his comment in accepted answer. – anatoly techtonik Dec 17 '14 at 10:21
3 Answers
98
You need an scp client. Putty is not one. You can use WinSCP or PSCP. Both are free software.

Johan
- 5,003
- 3
- 36
- 50
-
I used WinSCP to upload file, but after it seemed worked i got that file on server =0 byte. – RaShe Aug 11 '11 at 12:13
-
1I cannot tell why. As RaShe suggest, it might be a network issue. Maybe you can look in to the log files on the server to get a hint. (sudo) ls -lr /var/log – Johan Aug 11 '11 at 12:58
-
Bitkinex (http://www.bitkinex.com/) is another viable option for this task – Zlatin Zlatev Aug 29 '14 at 10:31
-
2pscp is listed on the PuTTY download page, and really is an scp client: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html – Alexander Dec 06 '14 at 21:39
52
"C:\Program Files\PuTTY\pscp.exe" -scp file.py server.com:
file.py
will be uploaded into your HOME
dir on remote server.
or when the remote server has a different user, use "C:\Program Files\PuTTY\pscp.exe" -l username -scp file.py server.com:
After connecting to the server pscp will ask for a password.

cmd
- 11,622
- 7
- 51
- 61

anatoly techtonik
- 19,847
- 9
- 124
- 140
-
Get the message "More than one remote source not supported". What to do about this? running on Windows 8.1 – Codebeat Jan 17 '14 at 09:55
-
@Erwinus, something is wrong with your command line arguments. See https://superuser.com/questions/511755/more-than-one-remote-source-not-supported-when-copying-files-via-pscp – anatoly techtonik Jan 17 '14 at 10:00
-
-
1This answers the initial question the best way, since PSCP is generally a part of Putty. So +1 – sasha_gud Aug 04 '15 at 09:25
-
1Updated command: `"C:\Program Files\PuTTY\pscp.exe" -P 22 file.py username@ip_address_or_domain:` Also change port number (the number after `-P`) if the server listening different port for SSH. Another option, to upload another directory instead of home, use like this `"C:\Program Files\PuTTY\pscp.exe" -P 22 file.py username@ip_address_or_domain:/var/www/html` – tatoline Nov 24 '20 at 16:57
17
Use WinSCP for file transfer over SSH, putty is only for SSH commands.

Mihai Maruseac
- 20,967
- 7
- 57
- 109
-
I used WinSCP to upload file, but after it seemed worked i got that file on server =0 byte. – RaShe Aug 11 '11 at 12:17
-
-
For me WinSCP did not worked though https://www.bitvise.com/ssh-client worked great. – M at Aug 10 '19 at 15:29