The output should look something like this: Fetching /home/remote_username/filename.zip to filename.zip To download a single file from the remote server, use the get command: get filename.zip Downloading Files with the SFTP Command # The sftp command is useful when you work on a server without GUI, and you want to transfer files or perform other operations on the remote files. To connect to the remote server and download or upload files. If you are working on a desktop machine, you can use a GUI SFTP client like WinSCP SFTP allows you to transfer files between two machines securely. The local commands are prefixed with the letter l.įor example, to print the local working directory, you would type: cd lpwd Local working directory: /home/local_username ![]() The SFTP shell also provides commands for local navigation, information and file management. The above commands are used to navigate, and work on the remote location. For example, to switch to the /tmp directory you would type: cd /tmp To navigate to another directory, use the cd command. To list the files and directories, use the ls command: ls You can check that by typing: pwd Remote working directory: /home/remote_username When you are logged in to the remote server, your current working directory !command Execute 'command' in local shell This will output a long list of all available commands, including a short description of each command: Available commands:Ĭd path Change remote directory to 'path' To get a list of all available SFTP commands, type help, or ?. Most of the SFTP commands are similar or identical to the Linux shell commands. , use the -P option to specify the SFTP port: sftp -P custom_port Commands # If the remote SSH server is not listening on the default port 22 How to Use SCP Command to Securely Transfer Files
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |