{"id":10603,"date":"2023-06-10T16:44:03","date_gmt":"2023-06-10T11:14:03","guid":{"rendered":"https:\/\/www.skynats.com\/?p=10603"},"modified":"2025-10-22T11:27:59","modified_gmt":"2025-10-22T05:57:59","slug":"how-to-use-sftp-to-transfer-with-a-remote-server","status":"publish","type":"post","link":"https:\/\/www.skynats.com\/blog\/how-to-use-sftp-to-transfer-with-a-remote-server\/","title":{"rendered":"How To Use SFTP to Securely Transfer Files with a Remote Server"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">To use SFTP (SSH File Transfer Protocol) to securely transfer files with a <a href=\"https:\/\/www.skynats.com\/server-management\/\">remote server<\/a>, you can follow these steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open a terminal or command prompt on your local machine.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">2. Connect to the remote server using SFTP. Replace username with your actual username and remote_server with the server&#8217;s address or hostname:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sftp username@remote_server<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If the server uses a different SSH port (not the default port 22), you can specify it with the -P option followed by the port number.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sftp -P 2222 username@remote_server<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">5. Enter your password when prompted. If you have set up SSH key-based ChatGPT May 24 Version authentication, you may not need to enter a password.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">4. Once connected, you will see an sftp&gt; prompt. You can now use various commands to interact with the remote server.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use ls to list the files and directories in the current remote directory.<\/li>\n\n\n\n<li>Use cd to change the remote directory.<\/li>\n\n\n\n<li>Use pwd to display the current remote directory.<\/li>\n\n\n\n<li>Use Put to upload a file from your local machine to the remote server.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>put local_file<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Replace local_file with the path and name of the file you want to upload.<\/li>\n\n\n\n<li>Use get to download a file from the remote server to your local machine.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>get remote_file<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Replace remote_file with the path and name of the file you want to download.<\/li>\n\n\n\n<li>Use rm to delete a file on the remote server.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>rm remote_file<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Replace remote_file with the path and name of the file you want to delete.<\/li>\n\n\n\n<li>Use mkdir to create a directory on the remote server.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir remote_directory<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Replace remote_directory with the name of the directory you want to create.<\/li>\n\n\n\n<li>Use exit to close the SFTP connection and return to the local shell prompt.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">5. After you finish transferring files, type exit to close the SFTP session.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By using SFTP, you can securely transfer files between your local machine and the remote server over an encrypted SSH connection.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To use SFTP (SSH File Transfer Protocol) to securely transfer files with a remote server, you can follow these steps: 2. Connect to the remote server using SFTP. Replace username with your actual username and remote_server with the server&#8217;s address or hostname: If the server uses a different SSH port (not the default port 22), [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[193,72,22],"class_list":["post-10603","post","type-post","status-publish","format-standard","hentry","category-blog","tag-plesk-server-management","tag-server-management","tag-server-support"],"_links":{"self":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/10603","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/comments?post=10603"}],"version-history":[{"count":1,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/10603\/revisions"}],"predecessor-version":[{"id":16152,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/10603\/revisions\/16152"}],"wp:attachment":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/media?parent=10603"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/categories?post=10603"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/tags?post=10603"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}