devel:misc:ssh
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
devel:misc:ssh [2016/04/26 16:58] – created boemer | devel:misc:ssh [2016/05/13 16:44] – [SSH keys] boman | ||
---|---|---|---|
Line 5: | Line 5: | ||
* How to log into a remote machine? | * How to log into a remote machine? | ||
- | * How to configure the login properly with an SSH key and config file? | + | * How to configure the login properly with an SSH key and a config file? |
* How to transfer files from one machine to another? | * How to transfer files from one machine to another? | ||
Line 20: | Line 20: | ||
ssh boemer@clifton.ltas.ulg.ac.be | ssh boemer@clifton.ltas.ulg.ac.be | ||
- | The terminal then asks for the password and the connection is established. | + | The terminal then asks for the password and the connection is established. |
Always having to type the full '' | Always having to type the full '' | ||
Line 34: | Line 34: | ||
==== SSH keys ==== | ==== SSH keys ==== | ||
- | SSH keys are similar to passwords. | + | SSH keys are similar to passwords. |
+ | The public key has to be transfered to the remote machine by the command '' | ||
- | The public key has to be transfered to the remote machine by the command '' | + | When you try to connect for the next time to the remote machine, no password will be asked since the ssh command compares your private key in '' |
- | + | ||
- | When you try to connect for the next time to the remote machine, no password will be asked since the ssh command compares your private key in '' | + | |
Line 47: | Line 46: | ||
ssh boemer@fabulous.ltas.ulg.ac.be | ssh boemer@fabulous.ltas.ulg.ac.be | ||
| | ||
- | The easiest way to do so is to copy your private key '' | + | The easiest way to do so is to copy your private key '' |
- | scp .ssh/id-rsa | + | scp .ssh/id_rsa |
</ | </ | ||
- | <note important> | + | <note important> |
chmod -R 700 .ssh | chmod -R 700 .ssh | ||
| | ||
- | This command sets the permission recursively for all files in the '' | + | This command sets the permission recursively for all files in the '' |
- | <note warning> Previously, it was suggested to copy your private key '' | + | <note warning> Previously, it was suggested to copy your private key '' |
==== Config file ==== | ==== Config file ==== | ||
+ | To log into a remote machine by typing | ||
+ | ssh clifton | ||
+ | | ||
+ | instead of | ||
+ | |||
+ | ssh boemer@clifton.ltas.ulg.ac.be | ||
+ | | ||
+ | a configuration file named '' | ||
+ | |||
+ | Host clifton | ||
+ | HostName clifton.ltas.ulg.ac.be | ||
+ | User boemer | ||
+ | IdentityFile ~/ | ||
+ | |||
+ | Additional defintions can simply be added to this file. If these abbreviations should also work on other machines, the '' | ||
===== File transfer ===== | ===== File transfer ===== | ||
- | Besides using FileZilla, files can also be directly transfered by SSH, or more precisely, SCP, i.e. Secure Copy. | + | Besides using FileZilla, files can also be directly transfered by SSH, or more precisely, |
+ | |||
+ | scp .ssh/config boemer@clifton.ltas.ulg.ac.be: | ||
+ | |||
+ | Or, in short, | ||
+ | |||
+ | scp .ssh/config clifton: | ||
devel/misc/ssh.txt · Last modified: 2017/07/10 18:12 by boemer