We are usually familiar with FTP when we transfer files from our computer to a shared web hosting service. With VPS, it usually have an ssh server that's why we can log in to a terminal
. The ssh protocol supports transferring of files called Secure copy (scp). We can just reuse this service and there is no need to install a new program to your VPS.
Create a User
When you want to transfer files, you need to supply a username and password. It is not a good idea to use root for file transfers. Create a new user for this. For example:
This is how to create a user with username john usig the adduser command. Supply the password and you can skip the other details by just hitting ENTER.
$ adduser john
Adding user `john' ...
Adding new group `john' (1000) ...
Adding new user `john' (1000) with group `john' ...
Creating home directory `/home/john' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for john
Enter the new value, or press ENTER for the default
Full Name :
Room Number :
Work Phone :
Home Phone :
Is the information correct? [Y/n]
A folder called "/home/john" will be created that will be the home folder of the new user. In Windows, the counterpart of this is "C:\Documents and Settings\john"
A popular client program in Windows that supports SCP is WinSCP. Go to it's download page http://winscp.net/eng/download.php
and download the program. Here is the link to the latest release
as of the time of this writing. Download the executable installer and follow the instructions:
To login, just provide the ip address of your VPS, together with your username and password. Make sure you select the SCP protocol:
After login, you will see on your left an explorer for your local computer. The right side will contain an explorer for the files on the server:
Transferring files will just be drag and drop. Like how you do it with your local folders: