Using SFTP To Upload and Manage Files On Your Server
| |In this section I will tell you how to upload and manage your site’s files and folders hosted on your unmanaged server. The very basic vision of this blog is to help newbie to build and setup unmanaged server even without any control panel software like cPanel, DirectAdmin, Plesk and so on. Many new server users are wondering how to upload all files including scripts and images of their website to their newly setup Apache or Nginx server if there is no File Manager like the one in cPanel. The answer is easy, simply use your favorite FTP client.
In this case you’ll need a client app that supports SFTP connection and for me, the most important one it should be a freeware. Need recommendation? Try FileZilla, CoreFTP, WinSCP, and CoffeeCup Free FTP.
How To Connect To Your Server via SFTP
In this example I will use FileZilla (my favorite app) to browse around my Playground server. Please do remember that each time I say “server” it refers to either VPS or Dedicated server.
Step 1 – Download the FTP software of your choice. Once done, launch it up.
Step 2 – Now add your server details to the FTP client. As I use FileZilla, the process should be like this: Open Site Manager section. You can click on its button in the left corner or via File menu then choose Site Manager. Alternatively you can simply hit Control+S buttons on your keyboard.
Step 3 – Give your new server a name (just for identification in the app).
Step 4 – Enter your server’s IP or host name (usually FQDN) in the “Host” field.
Step 5 – If you have not changed its default port yet, enter “22” in the “Port” field. Otherwise you should enter the port numbers you defined (read: how to change default SSH port number).
Step 6 – In the “Protocol” dropdown option select “SFTP – SSH File Transfer Protocol“.
Step 7 – In Logon Type select “Normal”. Now enter username to login to your server if you’ve added one and disabled root login. Otherwise simply use “root” as user then enter the password. Once done, click the OK button.
Step 8 – How to connect to your server? Simply hit the small dropdown option beside the Site Manager icon and select your server. Upon clicking, FileZilla will automatically attempt to connect to your server using the details given.
Step 9 – Next, simply navigate to the root directory of your server which is usually “/var/www/domain.com/htdocs” or “/var/www/domain.com/public_html”.
Step 10 – How to upload your files to the server via SFTP? Simply navigate into your local directory (in your computer) and locate where you stored all your websites files. You can do that in the left pane. Once done, simply drag-and-drop it to the left pane which is the pane where you browse your server directories.
How To Edit File On Your Server via SFTP?
Step 1 – Once all your site’s files been uploaded, simply right-click on the file you wish to edit.
Step 2 – Then choose “View/Edit” menu.
Step 3 – It will then open your default text editor tool (e.g: NotePad) so you can make some modifications and edit the file content.
Step 4 – So now you can edit it and once done, simply hit the Save button or close the text editor and hit Save. You’ll be then asked to upload the modified file to server. Simply tick mark the “Finish Editing and Delete Local File” then click the Yes button.
How To Create New Folder or Directory?
Step 1 – Simply right-click in any empty area then select “Create Directory” option.
Step 2 – Now give it a name then hit the OK button.
How To Change File Permission?
Step 1 – Right-click on the file / folder you wish to change its permission.
Step 2 – Then click on the “File Permissions” option as shown above.
Step 3 – Another popup window will appear allows you to change and set what kind of permissions the file will have it.
Step 4 – You can set the permissions one by one or simply just typing its numeric value and all the permissions will automatically adjusted according the value (e.g: 755, 777, etc). Once done hit OK.
How To Disconnect From Your Server?
That’s very easy. Simply close the FTP client or by clicking Server menu then choose Disconnect. Alternatively simply hit Control+D on your keyboard.
Thank you for this tut, just what I needed!
Is there any other way to transfer files?SFTP is terribly slow with my vps.And also thank you for writing so many tutorials that are very helpful for newbies.
Yes there are few ways like zipping all your files then upload it somewhere else followed by downloading that file using wget then unzip. Also, you can use rsync to sync your local folder (and files) with your server 🙂
FTP Manager Lite is one of the best free FTP and SFTP client software. The clean interface is super easy to use. It will perform your files transfers quickly and efficiently. It also supports FXP for superfast server to server transfers.
http://www.deskshare.com/ftp-manager-free.aspx