ubuntu:ftp:connect_with_sftp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
ubuntu:ftp:connect_with_sftp [2019/11/29 14:18] peterubuntu:ftp:connect_with_sftp [2020/07/15 09:30] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== Ubuntu - FTP - Connect with SFTP ====== ====== Ubuntu - FTP - Connect with SFTP ======
  
-<WRAP center round todo 60%>+<WRAP todo>
 TODO TODO
 </WRAP> </WRAP>
Line 30: Line 30:
 ---- ----
  
-We can establish an SSH connection and then open up an SFTP session using that connection by issuing the following command:+===== Establish an SSH connection ===== 
 + 
 +Establish an SSH connection and then open up an SFTP session using that connection by issuing the following command:
  
 <code bash> <code bash>
Line 42: Line 44:
 ===== Getting Help in SFTP ===== ===== Getting Help in SFTP =====
  
-The most useful command to learn first is the help command. This gives you access to a summary of the SFTP help. You can call it by typing either of these in the prompt:+The most useful command to learn first is the **help** command. 
 + 
 +This gives you access to a summary of the SFTP help.  
 + 
 +You can call it by typing either of these in the prompt:
  
 <code bash> <code bash>
 help help
 +</code>
 +
 +or
 +
 +<code bash>
 ? ?
 </code> </code>
Line 76: Line 87:
 We can navigate through the remote system's file hierarchy using a number of commands that function similarly to their shell counterparts. We can navigate through the remote system's file hierarchy using a number of commands that function similarly to their shell counterparts.
  
-First, let's orient ourselves by finding out which directory we are in currently on the remote system. Just like in a typical shell session, we can type the following to get the current directory:+First, let's orient ourselves by finding out which directory we are in currently on the remote system.  
 + 
 +Just like in a typical shell session, we can type the following to get the current directory:
  
 <code bash> <code bash>
Line 83: Line 96:
  
 Remote working directory: /home/demouser Remote working directory: /home/demouser
 +
 +----
 +
 We can view the contents of the current directory of the remote system with another familiar command: We can view the contents of the current directory of the remote system with another familiar command:
  
Line 124: Line 140:
 </code> </code>
  
-We can now traverse the remote file system, but what if we need to access our local file system? We can direct commands towards the local file system by preceding them with an "lfor local.+We can now traverse the remote file system, but what if we need to access our local file system?  
 + 
 +We can direct commands towards the local file system by preceding them with an **l** for local.
  
 ---- ----
  
-All of the commands discussed so far have local equivalents. We can print the local working directory:+All of the commands discussed so far have local equivalents. 
 + 
 +We can print the local working directory:
  
 <code bash> <code bash>
Line 160: Line 180:
  
  
-Transferring Files with SFTP+----
  
-Navigating the remote and local filesystems is of limited usefulness without being able to transfer files between the two.+===== Transferring Files with SFTP =====
  
-----+Navigating the remote and local filesystems is of limited usefulness without being able to transfer files between the two.
  
-===== Transferring Remote Files to the Local System =====+==== Transferring Remote Files to the Local System ====
  
 If we would like download files from our remote host, we can do so by issuing the following command: If we would like download files from our remote host, we can do so by issuing the following command:
Line 192: Line 212:
  
 ---- ----
 +
 The "get" command also takes some option flags. For instance, we can copy a directory and all of its contents by specifying the recursive option: The "get" command also takes some option flags. For instance, we can copy a directory and all of its contents by specifying the recursive option:
  
Line 205: Line 226:
 get -Pr someDirectory get -Pr someDirectory
 </code> </code>
 +
 +----
  
 ==== Transferring Local Files to the Remote System ==== ==== Transferring Local Files to the Remote System ====
Line 243: Line 266:
 </code> </code>
  
-shows:+returns:
  
 <code bash> <code bash>
Line 259: Line 282:
 </code> </code>
  
-shows:+returns:
  
 <code bash> <code bash>
Line 293: Line 316:
 </code> </code>
  
-Notice how, unlike the system "chmod" command, the SFTP command does not accept usernames, but instead uses UIDs. Unfortunately, there is no easy way to know the appropriate UID from within the SFTP interface.+Notice how, unlike the system "chmod" command, the SFTP command does not accept usernames, but instead uses UIDs. 
 + 
 +Unfortunately, there is no easy way to know the appropriate UID from within the SFTP interface.
  
 An involved work around could be accomplished with: An involved work around could be accomplished with:
Line 302: Line 327:
 </code> </code>
  
-shows:+returns:
  
 <code bash> <code bash>
Line 327: Line 352:
 </code> </code>
  
-Again, there is no easy way to get a listing of the remote system's groups. We can work around it with the following command:+Again, there is no easy way to get a listing of the remote system's groups.  
 + 
 +We can work around it with the following command:
  
 <code bash> <code bash>
Line 334: Line 361:
 </code> </code>
  
-displays:+returns:
  
 <code bash> <code bash>
Line 419: Line 446:
  
 https://www.digitalocean.com/community/tutorials/how-to-use-sftp-to-securely-transfer-files-with-a-remote-server https://www.digitalocean.com/community/tutorials/how-to-use-sftp-to-securely-transfer-files-with-a-remote-server
 +
ubuntu/ftp/connect_with_sftp.1575037114.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki