{"id":10916,"date":"2024-01-18T06:10:11","date_gmt":"2024-01-18T06:10:11","guid":{"rendered":"https:\/\/greenwebpage.com\/community\/?p=10916"},"modified":"2024-03-26T10:02:14","modified_gmt":"2024-03-26T10:02:14","slug":"how-to-use-sftp-to-securely-transfer-files-with-a-remote-server-on-ubuntu-22-04","status":"publish","type":"post","link":"https:\/\/greenwebpage.com\/community\/how-to-use-sftp-to-securely-transfer-files-with-a-remote-server-on-ubuntu-22-04\/","title":{"rendered":"How to Use SFTP to Securely Transfer Files with a Remote Server on Ubuntu 22.04?"},"content":{"rendered":"<p>SFTP (Secure File Transfer Protocol) is a tool provided by OpenSSH. The primary function of SFTP is to encrypt and secure data during network transfers. It is widely used to safeguard and secure sensitive data that only authorized users have access to the data.<\/p>\n<p>This article aims to give you an insight into how to install, configure, and use SFTP to transfer files with a remote server on Ubuntu 22.04 securely. Also, check <a href=\"https:\/\/greenwebpage.com\/community\/how-to-use-rsync-to-sync-local-and-remote-files-and-directories-in-ubuntu-22-04\/\">How To Use Rsync to Sync Local and Remote Files and Directories in Ubuntu 22.04<\/a>.<\/p>\n<h2><strong>How to Use SFTP to Securely Transfer Files with a Remote Server on Ubuntu 22.04?<\/strong><\/h2>\n<p>Before initiating to securely transfer files with a remote server, make sure that the SFTP server is installed and configured on your Ubuntu 22.04 system.<\/p>\n<p>To set up the environment for the SFTP server, follow these steps.<\/p>\n<h3><strong>How to Install SFTP Server using OpenSSH?<\/strong><\/h3>\n<p>These instructions can be followed to install SFTP on your Ubuntu 22.04 machine using the command line.<\/p>\n<h4>Step 1: Update System Files<\/h4>\n<p>Updating the system files is the necessary step to refresh the system repositories and packages. When the system has the latest versions of installed packages, the system&#8217;s performance will improve:<\/p>\n<table>\n<thead>\n<tr>\n<th>\n<pre>sudo apt update<\/pre>\n<\/th>\n<\/tr>\n<\/thead>\n<\/table>\n<pre><img fetchpriority=\"high\" decoding=\"async\" width=\"954\" height=\"246\" class=\"wp-image-10917\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-1.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-1.png 954w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-1-300x77.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-1-768x198.png 768w\" sizes=\"(max-width: 954px) 100vw, 954px\" \/><\/pre>\n<p>The output shows that all the available packages have the latest versions on your system.<\/p>\n<h4>Step 2: Install OpenSSH Server via APT<\/h4>\n<p>The OpenSSH suite includes tools like SSH, SCP, and SFTP for performing remote operations. Therefore, utilize the APT package manager to install the complete package of OpenSSH on your Ubuntu 22.04 system:<\/p>\n<table>\n<thead>\n<tr>\n<th>\n<pre>sudo apt install openssh-server -y<\/pre>\n<\/th>\n<\/tr>\n<\/thead>\n<\/table>\n<pre><img decoding=\"async\" width=\"974\" height=\"586\" class=\"wp-image-10918\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-2.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-2.png 974w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-2-300x180.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-2-768x462.png 768w\" sizes=\"(max-width: 974px) 100vw, 974px\" \/><\/pre>\n<p><img decoding=\"async\" width=\"964\" height=\"472\" class=\"wp-image-10919\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-3.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-3.png 964w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-3-300x147.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-3-768x376.png 768w\" sizes=\"(max-width: 964px) 100vw, 964px\" \/><\/p>\n<p>The APT package manager has installed the OpenSSH along with its large suite, such as SSH and SFTP on your Ubuntu.<\/p>\n<h4>Step 3: Check SSH Status<\/h4>\n<p>You can easily check the status of the SSH service through the command:<\/p>\n<table>\n<thead>\n<tr>\n<th>\n<pre>sudo systemctl status ssh<\/pre>\n<\/th>\n<\/tr>\n<\/thead>\n<\/table>\n<pre><img loading=\"lazy\" decoding=\"async\" width=\"968\" height=\"484\" class=\"wp-image-10920\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-4.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-4.png 968w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-4-300x150.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-4-768x384.png 768w\" sizes=\"(max-width: 968px) 100vw, 968px\" \/><\/pre>\n<p>The active status on your screen indicates that the OpenSSH is functional.<\/p>\n<h3><strong>How to Create a Group and a New User for SFTP?<\/strong><\/h3>\n<p>In this session, you will see how to create a secure group and a new user for SFTP using a terminal.<\/p>\n<h4>Step 1: Create a Group<\/h4>\n<p>Create a new group named <strong>mygroup<\/strong> to manage user permissions, especially when configuring an SFTP server:<\/p>\n<table>\n<thead>\n<tr>\n<th>\n<pre>sudo addgroup mygroup<\/pre>\n<\/th>\n<\/tr>\n<\/thead>\n<\/table>\n<pre><img loading=\"lazy\" decoding=\"async\" width=\"932\" height=\"102\" class=\"wp-image-10921\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-5.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-5.png 932w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-5-300x33.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-5-768x84.png 768w\" sizes=\"(max-width: 932px) 100vw, 932px\" \/><\/pre>\n<p>As you can see, <strong>mygroup<\/strong> has been created successfully.<\/p>\n<h4>Step 2: Create a User within mygroup<\/h4>\n<p>After creating a new group, run the command to create and add the new user (user1) to the group:<\/p>\n<table>\n<thead>\n<tr>\n<th>\n<pre>sudo useradd -m user1 -G mygroup<\/pre>\n<\/th>\n<\/tr>\n<\/thead>\n<\/table>\n<pre><img loading=\"lazy\" decoding=\"async\" width=\"926\" height=\"49\" class=\"wp-image-10922\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-6.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-6.png 926w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-6-300x16.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-6-768x41.png 768w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-6-900x49.png 900w\" sizes=\"(max-width: 926px) 100vw, 926px\" \/><\/pre>\n<p>The command returned an empty output which means that a new user was added to <strong>mygroup<\/strong>.<\/p>\n<h4>Step 3: Create User Password<\/h4>\n<p>To secure access to the <strong>user1<\/strong> account, execute the command to set a password:<\/p>\n<table>\n<thead>\n<tr>\n<th>\n<pre>sudo passwd user1<\/pre>\n<\/th>\n<\/tr>\n<\/thead>\n<\/table>\n<pre><img loading=\"lazy\" decoding=\"async\" width=\"939\" height=\"126\" class=\"wp-image-10923\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-7.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-7.png 939w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-7-300x40.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-7-768x103.png 768w\" sizes=\"(max-width: 939px) 100vw, 939px\" \/><\/pre>\n<p>The password against the <strong>user1<\/strong> has been successfully created.<\/p>\n<h4>Step 4: Permit to a Particular User<\/h4>\n<p>Run the command to grant full control to the <strong>user1<\/strong> over the <strong>home<\/strong> directory:<\/p>\n<table>\n<thead>\n<tr>\n<th>\n<pre>sudo chmod 700 \/home\/user1<\/pre>\n<\/th>\n<\/tr>\n<\/thead>\n<\/table>\n<pre><img loading=\"lazy\" decoding=\"async\" width=\"926\" height=\"54\" class=\"wp-image-10924\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-8.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-8.png 926w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-8-300x17.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-8-768x45.png 768w\" sizes=\"(max-width: 926px) 100vw, 926px\" \/><\/pre>\n<p>Here, <strong>700<\/strong> means that only <strong>user1<\/strong> has full access (read, write, execute) to the \/<strong>home\/<\/strong> directory.<\/p>\n<h4>Step 5: Modify the Configuration Settings<\/h4>\n<p>Open the Nano text editor using the terminal:<\/p>\n<table>\n<thead>\n<tr>\n<th>\n<pre>sudo nano \/etc\/ssh\/sshd_config<\/pre>\n<\/th>\n<\/tr>\n<\/thead>\n<\/table>\n<pre><img loading=\"lazy\" decoding=\"async\" width=\"903\" height=\"54\" class=\"wp-image-10925\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-9.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-9.png 903w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-9-300x18.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-9-768x46.png 768w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-9-900x54.png 900w\" sizes=\"(max-width: 903px) 100vw, 903px\" \/><\/pre>\n<p>Within the SSH configuration file, add the following lines of code to restrict the file transfer to a specific group, such as <strong>mygroup<\/strong>:<\/p>\n<table>\n<thead>\n<tr>\n<th>\n<pre>Match group mygroup \nChrootDirectory \/home \nX11Forwarding no \nAllowTcpForwarding no \nForceCommand internal-sftp<\/pre>\n<\/th>\n<\/tr>\n<\/thead>\n<\/table>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"974\" height=\"530\" class=\"wp-image-10926\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-10.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-10.png 974w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-10-300x163.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-10-768x418.png 768w\" sizes=\"(max-width: 974px) 100vw, 974px\" \/><\/p>\n<p>Make sure to replace <strong>mygroup<\/strong> with the name of your specified group.<\/p>\n<h3><strong>How to Use SFTP to Securely Transfer Files with a Remote Server?<\/strong><\/h3>\n<p>Follow these steps to establish the SFTP connection and securely transfer files with a remote server.<\/p>\n<h4>Step 1: Establish the SFTP Connection for user1<\/h4>\n<p>Run the sftp command followed by a username and IP address to connect to a remote server from your Ubuntu 22.04 machine:<\/p>\n<table>\n<thead>\n<tr>\n<th>\n<pre>sftp user1@127.0.0.1<\/pre>\n<\/th>\n<\/tr>\n<\/thead>\n<\/table>\n<pre><img loading=\"lazy\" decoding=\"async\" width=\"967\" height=\"163\" class=\"wp-image-10927\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-11.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-11.png 967w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-11-300x51.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-11-768x129.png 768w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-11-960x163.png 960w\" sizes=\"(max-width: 967px) 100vw, 967px\" \/><\/pre>\n<p>The SFTP is now connected to localhost via the 127.0.0.1 IP address.<\/p>\n<h4>Step 2: Display Present Working Directory<\/h4>\n<p>Check your current directory location within the SFTP server by using the <strong>pwd<\/strong> command:<\/p>\n<table>\n<thead>\n<tr>\n<th>\n<pre>pwd<\/pre>\n<\/th>\n<\/tr>\n<\/thead>\n<\/table>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"959\" height=\"79\" class=\"wp-image-10928\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-12.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-12.png 959w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-12-300x25.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-12-768x63.png 768w\" sizes=\"(max-width: 959px) 100vw, 959px\" \/><\/p>\n<p>The present working directory is <strong>\/home\/user1<\/strong>.<\/p>\n<h4>Step 3: Make a New Directory<\/h4>\n<p>You can create a directory with <strong>mkdir<\/strong> command:<\/p>\n<table>\n<thead>\n<tr>\n<th>\n<pre>mkdir testFile<\/pre>\n<\/th>\n<\/tr>\n<\/thead>\n<\/table>\n<pre><img loading=\"lazy\" decoding=\"async\" width=\"779\" height=\"54\" class=\"wp-image-10929\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-13.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-13.png 779w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-13-300x21.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-13-768x53.png 768w\" sizes=\"(max-width: 779px) 100vw, 779px\" \/><\/pre>\n<h4>Step 4: List the Existing Files<\/h4>\n<p>Run the <strong>ls<\/strong> command to view the available files in the present path:<\/p>\n<table>\n<thead>\n<tr>\n<th>\n<pre>ls<\/pre>\n<\/th>\n<\/tr>\n<\/thead>\n<\/table>\n<pre><img loading=\"lazy\" decoding=\"async\" width=\"808\" height=\"75\" class=\"wp-image-10930\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-14.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-14.png 808w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-14-300x28.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-14-768x71.png 768w\" sizes=\"(max-width: 808px) 100vw, 808px\" \/><\/pre>\n<p>The new directory named <strong>testFile<\/strong> has been created without encountering any error.<\/p>\n<h4>Step 5: Exit from the SFTP Terminal<\/h4>\n<p>You can exit from the SFTP server at any time using the command:<\/p>\n<table>\n<thead>\n<tr>\n<th>\n<pre>exit<\/pre>\n<\/th>\n<\/tr>\n<\/thead>\n<\/table>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"889\" height=\"55\" class=\"wp-image-10931\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-15.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-15.png 889w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-15-300x19.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-15-768x48.png 768w\" sizes=\"(max-width: 889px) 100vw, 889px\" \/><\/p>\n<h3><strong>How to Use a GUI Method to Securely Transfer Files via SFTP?<\/strong><\/h3>\n<p>In the following, we will use a graphical interface to transfer files using SFTP.<\/p>\n<h4>Step 1: Locate Files &gt; Other Locations<\/h4>\n<p>SFTP allows you to access the SFTP server via a graphical user interface (GUI):<\/p>\n<ul>\n<li>Open <strong>Files<\/strong> of your Ubuntu 22.04 machine.<\/li>\n<li>Select <strong>Other Locations.<\/strong><\/li>\n<li>Type the IP address of the SFTP server in the <strong>Connect to Server<\/strong> field.<\/li>\n<li>Click on the <strong>Connect<\/strong> button.<\/li>\n<\/ul>\n<table>\n<thead>\n<tr>\n<th>\n<pre>sftp:\/\/127.0.0.1\/<\/pre>\n<\/th>\n<\/tr>\n<\/thead>\n<\/table>\n<pre><img loading=\"lazy\" decoding=\"async\" width=\"889\" height=\"550\" class=\"wp-image-10932\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-16.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-16.png 889w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-16-300x186.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-16-768x475.png 768w\" sizes=\"(max-width: 889px) 100vw, 889px\" \/><\/pre>\n<h4>Step 2: Authenticate the SFTP Server<\/h4>\n<p>Enter the username created within the <strong>mygroup<\/strong>, type your password, and click the <strong>Connect<\/strong> button to establish the SFTP server connection:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"884\" height=\"545\" class=\"wp-image-10933\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-17.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-17.png 884w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-17-300x185.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-17-768x473.png 768w\" sizes=\"(max-width: 884px) 100vw, 884px\" \/><\/p>\n<p>You are now remotely connected to the SFTP server and can view the files within the directory:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"887\" height=\"548\" class=\"wp-image-10934\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-18.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-18.png 887w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-18-300x185.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/word-image-10916-18-768x474.png 768w\" sizes=\"(max-width: 887px) 100vw, 887px\" \/><\/p>\n<h2>Conclusion<\/h2>\n<p>In Ubuntu 22.04, you can securely transfer files to a remote server using the SFTP server. To create a secure server, install the OpenSSH package on your local machine.<\/p>\n<p>The command<strong> sudo apt install openssh-server<\/strong> can be run from the terminal to install the complete package on your Ubuntu 22.04. You can create a group and user to manage permissions easily after installing the package. Establish SFTP connection using the command, such as <strong>sftp user@IP<\/strong>.<\/p>\n<p>This article practically demonstrated the complete process of installing, configuring, and file transferring with a remote server on Ubuntu 22.04.<\/p>\n\n    <div class=\"xs_social_share_widget xs_share_url after_content \t\tmain_content  wslu-style-1 wslu-share-box-shaped wslu-fill-colored wslu-none wslu-share-horizontal wslu-theme-font-no wslu-main_content\">\n\n\t\t\n        <ul>\n\t\t\t        <\/ul>\n    <\/div> \n","protected":false},"excerpt":{"rendered":"<p>SFTP (Secure File Transfer Protocol) is a tool provided by OpenSSH. The primary function of SFTP is to encrypt and secure data during network transfers. It is widely used to safeguard and secure sensitive data that only authorized users have access to the data. This article aims to give you an insight into how to [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":10935,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[271,270,224],"class_list":["post-10916","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-files","tag-sftp","tag-ubuntu-22-04"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Use SFTP to Securely Transfer Files with a Remote Server on Ubuntu 22.04? - Greenwebpage Community<\/title>\n<meta name=\"description\" content=\"This article aims to give you an insight into how to use SFTP command to transfer files with a remote server on Ubuntu 22.04 securely.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/greenwebpage.com\/community\/how-to-use-sftp-to-securely-transfer-files-with-a-remote-server-on-ubuntu-22-04\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Use SFTP to Securely Transfer Files with a Remote Server on Ubuntu 22.04? - Greenwebpage Community\" \/>\n<meta property=\"og:description\" content=\"This article aims to give you an insight into how to use SFTP command to transfer files with a remote server on Ubuntu 22.04 securely.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/greenwebpage.com\/community\/how-to-use-sftp-to-securely-transfer-files-with-a-remote-server-on-ubuntu-22-04\/\" \/>\n<meta property=\"og:site_name\" content=\"Greenwebpage Community\" \/>\n<meta property=\"article:published_time\" content=\"2024-01-18T06:10:11+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-26T10:02:14+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/How-to-Use-SFTP-to-Securely-Transfer-Files-with-a-Remote-Server-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1020\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Karim Buzdar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Karim Buzdar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-use-sftp-to-securely-transfer-files-with-a-remote-server-on-ubuntu-22-04\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-use-sftp-to-securely-transfer-files-with-a-remote-server-on-ubuntu-22-04\/\"},\"author\":{\"name\":\"Karim Buzdar\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8\"},\"headline\":\"How to Use SFTP to Securely Transfer Files with a Remote Server on Ubuntu 22.04?\",\"datePublished\":\"2024-01-18T06:10:11+00:00\",\"dateModified\":\"2024-03-26T10:02:14+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-use-sftp-to-securely-transfer-files-with-a-remote-server-on-ubuntu-22-04\/\"},\"wordCount\":888,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-use-sftp-to-securely-transfer-files-with-a-remote-server-on-ubuntu-22-04\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/How-to-Use-SFTP-to-Securely-Transfer-Files-with-a-Remote-Server-1.jpg\",\"keywords\":[\"Files\",\"SFTP\",\"Ubuntu 22.04\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/greenwebpage.com\/community\/how-to-use-sftp-to-securely-transfer-files-with-a-remote-server-on-ubuntu-22-04\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-use-sftp-to-securely-transfer-files-with-a-remote-server-on-ubuntu-22-04\/\",\"url\":\"https:\/\/greenwebpage.com\/community\/how-to-use-sftp-to-securely-transfer-files-with-a-remote-server-on-ubuntu-22-04\/\",\"name\":\"How to Use SFTP to Securely Transfer Files with a Remote Server on Ubuntu 22.04? - Greenwebpage Community\",\"isPartOf\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-use-sftp-to-securely-transfer-files-with-a-remote-server-on-ubuntu-22-04\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-use-sftp-to-securely-transfer-files-with-a-remote-server-on-ubuntu-22-04\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/How-to-Use-SFTP-to-Securely-Transfer-Files-with-a-Remote-Server-1.jpg\",\"datePublished\":\"2024-01-18T06:10:11+00:00\",\"dateModified\":\"2024-03-26T10:02:14+00:00\",\"description\":\"This article aims to give you an insight into how to use SFTP command to transfer files with a remote server on Ubuntu 22.04 securely.\",\"breadcrumb\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-use-sftp-to-securely-transfer-files-with-a-remote-server-on-ubuntu-22-04\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/greenwebpage.com\/community\/how-to-use-sftp-to-securely-transfer-files-with-a-remote-server-on-ubuntu-22-04\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-use-sftp-to-securely-transfer-files-with-a-remote-server-on-ubuntu-22-04\/#primaryimage\",\"url\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/How-to-Use-SFTP-to-Securely-Transfer-Files-with-a-Remote-Server-1.jpg\",\"contentUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/How-to-Use-SFTP-to-Securely-Transfer-Files-with-a-Remote-Server-1.jpg\",\"width\":1020,\"height\":600,\"caption\":\"How to Use SFTP to Securely Transfer Files with a Remote Server\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-use-sftp-to-securely-transfer-files-with-a-remote-server-on-ubuntu-22-04\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/greenwebpage.com\/community\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Use SFTP to Securely Transfer Files with a Remote Server on Ubuntu 22.04?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#website\",\"url\":\"https:\/\/greenwebpage.com\/community\/\",\"name\":\"Greenwebpage Community\",\"description\":\"Get online in three steps with our wide range of web hosting solutions. Choose from professional business to enterprise options designed to meet your needs.\",\"publisher\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/greenwebpage.com\/community\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\",\"name\":\"Greenwebpage Community\",\"url\":\"https:\/\/greenwebpage.com\/community\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png\",\"contentUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png\",\"width\":512,\"height\":512,\"caption\":\"Greenwebpage Community\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8\",\"name\":\"Karim Buzdar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g\",\"caption\":\"Karim Buzdar\"},\"sameAs\":[\"https:\/\/greenwebpage.com\"],\"url\":\"https:\/\/greenwebpage.com\/community\/author\/karim\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Use SFTP to Securely Transfer Files with a Remote Server on Ubuntu 22.04? - Greenwebpage Community","description":"This article aims to give you an insight into how to use SFTP command to transfer files with a remote server on Ubuntu 22.04 securely.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/greenwebpage.com\/community\/how-to-use-sftp-to-securely-transfer-files-with-a-remote-server-on-ubuntu-22-04\/","og_locale":"en_US","og_type":"article","og_title":"How to Use SFTP to Securely Transfer Files with a Remote Server on Ubuntu 22.04? - Greenwebpage Community","og_description":"This article aims to give you an insight into how to use SFTP command to transfer files with a remote server on Ubuntu 22.04 securely.","og_url":"https:\/\/greenwebpage.com\/community\/how-to-use-sftp-to-securely-transfer-files-with-a-remote-server-on-ubuntu-22-04\/","og_site_name":"Greenwebpage Community","article_published_time":"2024-01-18T06:10:11+00:00","article_modified_time":"2024-03-26T10:02:14+00:00","og_image":[{"width":1020,"height":600,"url":"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/How-to-Use-SFTP-to-Securely-Transfer-Files-with-a-Remote-Server-1.jpg","type":"image\/jpeg"}],"author":"Karim Buzdar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Karim Buzdar","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/greenwebpage.com\/community\/how-to-use-sftp-to-securely-transfer-files-with-a-remote-server-on-ubuntu-22-04\/#article","isPartOf":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-use-sftp-to-securely-transfer-files-with-a-remote-server-on-ubuntu-22-04\/"},"author":{"name":"Karim Buzdar","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8"},"headline":"How to Use SFTP to Securely Transfer Files with a Remote Server on Ubuntu 22.04?","datePublished":"2024-01-18T06:10:11+00:00","dateModified":"2024-03-26T10:02:14+00:00","mainEntityOfPage":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-use-sftp-to-securely-transfer-files-with-a-remote-server-on-ubuntu-22-04\/"},"wordCount":888,"commentCount":0,"publisher":{"@id":"https:\/\/greenwebpage.com\/community\/#organization"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-use-sftp-to-securely-transfer-files-with-a-remote-server-on-ubuntu-22-04\/#primaryimage"},"thumbnailUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/How-to-Use-SFTP-to-Securely-Transfer-Files-with-a-Remote-Server-1.jpg","keywords":["Files","SFTP","Ubuntu 22.04"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/greenwebpage.com\/community\/how-to-use-sftp-to-securely-transfer-files-with-a-remote-server-on-ubuntu-22-04\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/greenwebpage.com\/community\/how-to-use-sftp-to-securely-transfer-files-with-a-remote-server-on-ubuntu-22-04\/","url":"https:\/\/greenwebpage.com\/community\/how-to-use-sftp-to-securely-transfer-files-with-a-remote-server-on-ubuntu-22-04\/","name":"How to Use SFTP to Securely Transfer Files with a Remote Server on Ubuntu 22.04? - Greenwebpage Community","isPartOf":{"@id":"https:\/\/greenwebpage.com\/community\/#website"},"primaryImageOfPage":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-use-sftp-to-securely-transfer-files-with-a-remote-server-on-ubuntu-22-04\/#primaryimage"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-use-sftp-to-securely-transfer-files-with-a-remote-server-on-ubuntu-22-04\/#primaryimage"},"thumbnailUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/How-to-Use-SFTP-to-Securely-Transfer-Files-with-a-Remote-Server-1.jpg","datePublished":"2024-01-18T06:10:11+00:00","dateModified":"2024-03-26T10:02:14+00:00","description":"This article aims to give you an insight into how to use SFTP command to transfer files with a remote server on Ubuntu 22.04 securely.","breadcrumb":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-use-sftp-to-securely-transfer-files-with-a-remote-server-on-ubuntu-22-04\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/greenwebpage.com\/community\/how-to-use-sftp-to-securely-transfer-files-with-a-remote-server-on-ubuntu-22-04\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/how-to-use-sftp-to-securely-transfer-files-with-a-remote-server-on-ubuntu-22-04\/#primaryimage","url":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/How-to-Use-SFTP-to-Securely-Transfer-Files-with-a-Remote-Server-1.jpg","contentUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/01\/How-to-Use-SFTP-to-Securely-Transfer-Files-with-a-Remote-Server-1.jpg","width":1020,"height":600,"caption":"How to Use SFTP to Securely Transfer Files with a Remote Server"},{"@type":"BreadcrumbList","@id":"https:\/\/greenwebpage.com\/community\/how-to-use-sftp-to-securely-transfer-files-with-a-remote-server-on-ubuntu-22-04\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/greenwebpage.com\/community\/"},{"@type":"ListItem","position":2,"name":"How to Use SFTP to Securely Transfer Files with a Remote Server on Ubuntu 22.04?"}]},{"@type":"WebSite","@id":"https:\/\/greenwebpage.com\/community\/#website","url":"https:\/\/greenwebpage.com\/community\/","name":"Greenwebpage Community","description":"Get online in three steps with our wide range of web hosting solutions. Choose from professional business to enterprise options designed to meet your needs.","publisher":{"@id":"https:\/\/greenwebpage.com\/community\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/greenwebpage.com\/community\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/greenwebpage.com\/community\/#organization","name":"Greenwebpage Community","url":"https:\/\/greenwebpage.com\/community\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/","url":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png","contentUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png","width":512,"height":512,"caption":"Greenwebpage Community"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8","name":"Karim Buzdar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g","caption":"Karim Buzdar"},"sameAs":["https:\/\/greenwebpage.com"],"url":"https:\/\/greenwebpage.com\/community\/author\/karim\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/10916","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/comments?post=10916"}],"version-history":[{"count":2,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/10916\/revisions"}],"predecessor-version":[{"id":11193,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/10916\/revisions\/11193"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/media\/10935"}],"wp:attachment":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/media?parent=10916"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/categories?post=10916"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/tags?post=10916"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}