Changes

Jump to navigation Jump to search
Add ssh connection documentation
Line 68: Line 68:  
# SHOULD: use SSH keys published on Github: giving access to a server is then simple and secure: <pre>curl https://github.com/CharlesNepote.keys | tee -a ~/.ssh/authorized_keys</pre>
 
# SHOULD: use SSH keys published on Github: giving access to a server is then simple and secure: <pre>curl https://github.com/CharlesNepote.keys | tee -a ~/.ssh/authorized_keys</pre>
 
# SHOULD: take care of production resources: use "nice" / "ionice" for scripts manually launched. Stéphane's tip: just use <pre>nice ./mycommand whatever arguments</pre> (nice default to lower the priority). CPU and I/O priorities can be set if needed at the virtualization level.
 
# SHOULD: take care of production resources: use "nice" / "ionice" for scripts manually launched. Stéphane's tip: just use <pre>nice ./mycommand whatever arguments</pre> (nice default to lower the priority). CPU and I/O priorities can be set if needed at the virtualization level.
 +
 +
= Usages =
 +
 +
== SSH connexion ==
 +
 +
=== If you have only one SSH key ===
 +
You can connect directly with:
 +
<pre>$ ssh -J [FQDN server] [internal IP]</pre>
 +
 +
Example:
 +
<pre>$ ssh -J ovh1.openfoodfacts.org 10.1.0.103</pre>
 +
 +
=== If you have many SSH keys ===
 +
<pre>ssh -i ~/.ssh/github_rsa -J stephanegigandet@ovh1.openfoodfacts.org stephanegigandet@10.1.0.103</pre>
 +
 +
You can modify your <code>~/.ssh/config</code> file and add:
 +
<pre>
 +
Host robotoff
 +
identityfile ~/.ssh/github_rsa
 +
proxyjump stephanegigandet@ovh1.openfoodfacts.org
 +
hostname 10.1.0.103
 +
user stephanegigandet
 +
</pre>
 +
Then you can connect yourself with a simpler command:
 +
<pre>$ ssh robotoff</pre>

Navigation menu