Welcome to WebmasterWorld Guest from

Forum Moderators: bakedjake

Message Too Old, No Replies

How can I get a file from a server via SSH?



5:11 pm on Feb 3, 2011 (gmt 0)

5+ Year Member

There is a PHP file on a server that I need to save to my local machine. How can I get this without using an FTP client, but through PuTTY or something else?

I have installed vsftp on the server but I can't connect with an FTP client for some reason. I need the file urgently, so while I work on figuring out why I can't connect via FTP, how can I get the file some other way?


11:25 am on Feb 4, 2011 (gmt 0)

5+ Year Member

Could work this way:

Log in to your server via ssh and then copy it via scp to your local machine:

'scp path_to_file local_username@local_ip_address:/path_to_file'


12:13 pm on Feb 4, 2011 (gmt 0)

5+ Year Member

I am getting:

ssh: connect to host port 22: Connection timed out
lost connection


2:48 pm on Feb 4, 2011 (gmt 0)

5+ Year Member

I ended up using PSCP and it worked.


10:59 am on Feb 7, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

I do this all the time using SFTP

Because I use Linux I just drag and drop using the Konqueror file manager, but you should be able to find a reasonable GUI SFTP client on any platform.

There is no real reason to use FTP any more. Sending passwords in plain text is not good security, and FTP does nothing to verify that you are connected to the server you wanted to be connected to either.

Featured Threads

Hot Threads This Week

Hot Threads This Month