tutorials:remote_access
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tutorials:remote_access [2011/02/01 02:55] – chkuo | tutorials:remote_access [2019/01/11 17:35] (current) – [Key] chkuo | ||
---|---|---|---|
Line 2: | Line 2: | ||
===== SSH ===== | ===== SSH ===== | ||
+ | |||
==== Login ==== | ==== Login ==== | ||
'' | '' | ||
Line 17: | Line 18: | ||
==== Key ==== | ==== Key ==== | ||
- | To generate key-pairs, use: <code bash> | + | To generate key-pairs, use: <code bash> |
- | This command will create a pair of private key ('' | + | This command will create a pair of private key ('' |
+ | |||
+ | If the home directory is encrypted, '' | ||
+ | For example (see [[https:// | ||
+ | * set up ''/ | ||
+ | * in ''/ | ||
+ | * restart sshd: '' | ||
+ | |||
+ | ==== Keep alive ==== | ||
+ | To prevent the ssh sessions from being disconnected due to inactivity, add the following lines to ''/ | ||
+ | < | ||
+ | ServerAliveInterval 60 | ||
+ | ServerAliveCountMax 60 | ||
+ | </ | ||
+ | This sends a signal every 60 seconds for a maximum of 60 times (one hour) from the client to the server. | ||
+ | |||
+ | If you do not have the permission to make this modification, | ||
===== SCP ===== | ===== SCP ===== | ||
- | '' | + | '' |
- | For example, | + | Similar to the example |
- | Reversely, to copy the file from the remote server back to the local workstation: | + | For example, to copy a file (foo.txt) from the home directory (~) of the local workstation to the home directory in the remote server, use: <code bash>scp ~/foo.txt 168.192.1.1: |
+ | |||
+ | Reversely, to copy the file from the remote server back to the local workstation, use: <code bash>scp 168.192.1.1: | ||
Some commonly used options include: | Some commonly used options include: | ||
Line 35: | Line 54: | ||
For example, to preserve the property of the file being copied, use: <code bash>scp -p ~/foo.txt 168.192.1.1: | For example, to preserve the property of the file being copied, use: <code bash>scp -p ~/foo.txt 168.192.1.1: | ||
- | To copy an entire directory: <code bash>scp -r ~/foo_dir 168.192.1.1: | + | To copy an entire directory, use: <code bash>scp -r ~/foo_dir 168.192.1.1: |
tutorials/remote_access.1296500102.txt.gz · Last modified: 2011/02/01 02:55 by chkuo