ubuntu:ftp:connect_with_sftp
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
ubuntu:ftp:connect_with_sftp [2019/11/29 14:18] – peter | ubuntu: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 todo> |
TODO | TODO | ||
</ | </ | ||
Line 30: | Line 30: | ||
---- | ---- | ||
- | We can establish | + | ===== Establish an SSH connection ===== |
+ | |||
+ | Establish | ||
<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 | ||
+ | </ | ||
+ | |||
+ | or | ||
+ | |||
+ | <code bash> | ||
? | ? | ||
</ | </ | ||
Line 76: | Line 87: | ||
We can navigate through the remote system' | We can navigate through the remote system' | ||
- | 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: / | Remote working directory: / | ||
+ | |||
+ | ---- | ||
+ | |||
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: | ||
</ | </ | ||
- | 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" | + | 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 " | The " | ||
Line 205: | Line 226: | ||
get -Pr someDirectory | get -Pr someDirectory | ||
</ | </ | ||
+ | |||
+ | ---- | ||
==== Transferring Local Files to the Remote System ==== | ==== Transferring Local Files to the Remote System ==== | ||
Line 243: | Line 266: | ||
</ | </ | ||
- | shows: | + | returns: |
<code bash> | <code bash> | ||
Line 259: | Line 282: | ||
</ | </ | ||
- | shows: | + | returns: |
<code bash> | <code bash> | ||
Line 293: | Line 316: | ||
</ | </ | ||
- | Notice how, unlike the system " | + | Notice how, unlike the system " |
+ | |||
+ | Unfortunately, | ||
An involved work around could be accomplished with: | An involved work around could be accomplished with: | ||
Line 302: | Line 327: | ||
</ | </ | ||
- | shows: | + | returns: |
<code bash> | <code bash> | ||
Line 327: | Line 352: | ||
</ | </ | ||
- | Again, there is no easy way to get a listing of the remote system' | + | Again, there is no easy way to get a listing of the remote system' |
+ | |||
+ | We can work around it with the following command: | ||
<code bash> | <code bash> | ||
Line 334: | Line 361: | ||
</ | </ | ||
- | displays: | + | returns: |
<code bash> | <code bash> | ||
Line 419: | Line 446: | ||
https:// | https:// | ||
+ |
ubuntu/ftp/connect_with_sftp.1575037114.txt.gz · Last modified: 2020/07/15 09:30 (external edit)