Difference between revisions of "AXIOM Beta/AXIOM Beta Software/SSH keys"

From apertus wiki
Jump to: navigation, search
(SSH keys how-to: add instructions on how to create ssh keys)
Line 1: Line 1:
=How-to=
 
You will need to create an SSH key pair for communication with your AXIOM Beta camera over ethernet if you don't already have one.
 
== Storage location / find existing keys ==
===  Mac & Linux ===
 
By default, the ssh directory is located at <code>~/.ssh</code>, and contains key files called <code>id_rsa</code> and <code>id_rsa.pub</code>, respectively. Check if the directory exists and already contains keys by listing its contents:
 
<pre>$ ls -al ~/.ssh</pre>
 
If the directory doesn't exist or is empty and you don't have your SSH keys stored elsewhere on your machine, follow the instructions for key creation
below.
 
== SSH key creation ==
===  Mac & Linux ===
 
Linux machines as well as new Macs usually come pre-installed with the tools you need for creating SSH keys. To start the key creation process, use the command:
 
<pre>$ ssh-keygen -t rsa -b 4096 -C "yourname@yourmachine</pre>
 
The <code>-C</code> argument is used to add a comment which can help indentify your key as yours/your machine's, which might come in handy once you use other computers to connect to your Beta camera. If you leave it out, your default username/hostname will be used (you can check with <code>$ echo "$(whoami)@$(hostname)"</code> either beforehand or in another Terminal window to find out what it is), though you can always change the comment part again later on.
 
You will be prompted for a file in which to save the keys. To use the default install location (recommended), just press Enter.
 
Next, you will be asked to enter a passphrase. Using a passphrase means greater security, though you can continue without one by just pressing Enter. In either case you will be asked to confirm your passphrase (by re-entering it if you used one, or pressing Enter again in case you did not).
 
Subsequently, your keys will be created and saved in the directory you specified (<code>~/.ssh</code> by default). You can have your machine print out your public key for you by using the command:
 
<pre>$ cat ~/.ssh/id_rsa.pub</pre>
 
The output will look approximately like this:
 
<pre style="white-space: pre-wrap;">ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCj8ZHA1ehuCwXvEzyG20Cv0SX1BZ9uyXvON4mDOJJHtG7WolOZG0QPYEPpNxUIFuuvYYl/ffNrV9v2cXyit28N28kqHprGlQK43r9poLACIU4BA6uFIFp5++tEsAiM0bCbQlExcZvxvQQONY8Slrl9/2kbEwFSnYdY9ORQxYsxB0gHAaDq8KFj6XQXZlyrLC46uoUDvF9DJOYmRBV/6gieWfPo3jaLS6S7mLICSB3jUK81ZD5D7IJrh1kifahmSyaui1kU4PxmmqdwPG8sFGhTsZTCavngYNzNaK1XhTeUppHblDuQUc6Z02K62Od6LMgk7khdrFlBrzpt5Yds3CztTiJ1PI1XKawhRLEMJe4ekXg+i+bz8vmuMiOrnzrK4U/GCs2a7pjx2mC4WBDd7xJKwYh9HMmLAT9l0VKH+BwEBJXq/0EqKDvMwpUn1h3HQey+Rcujf77IX+eSafyg762OKTRAniCSuhiH2jUWEzhj7cjTRIllxwXOBUUS6FtUYBUQ/sBE3bMmY85VMyF+6z6iiep7VZ9vBMNJtuol2k1wKsrrD3Finynr8gPqO2ghjK+ZvkxjgYANvV+gSvWVo2R8H1FUGA2pJegEkFNKONCyyd6xMWR5loh9NkG0UQpSk95kJH2q0QbaCrxLdPqqGY6UWp1zbXNMk33FeBv0XjjI+w== anne@farragut</pre>

Revision as of 11:12, 27 May 2016

You will need to create an SSH key pair for communication with your AXIOM Beta camera over ethernet if you don't already have one.

1 Storage location / find existing keys

1.1 Mac & Linux

By default, the ssh directory is located at ~/.ssh, and contains key files called id_rsa and id_rsa.pub, respectively. Check if the directory exists and already contains keys by listing its contents:

$ ls -al ~/.ssh

If the directory doesn't exist or is empty and you don't have your SSH keys stored elsewhere on your machine, follow the instructions for key creation below.

2 SSH key creation

2.1 Mac & Linux

Linux machines as well as new Macs usually come pre-installed with the tools you need for creating SSH keys. To start the key creation process, use the command:

$ ssh-keygen -t rsa -b 4096 -C "yourname@yourmachine

The -C argument is used to add a comment which can help indentify your key as yours/your machine's, which might come in handy once you use other computers to connect to your Beta camera. If you leave it out, your default username/hostname will be used (you can check with $ echo "$(whoami)@$(hostname)" either beforehand or in another Terminal window to find out what it is), though you can always change the comment part again later on.

You will be prompted for a file in which to save the keys. To use the default install location (recommended), just press Enter.

Next, you will be asked to enter a passphrase. Using a passphrase means greater security, though you can continue without one by just pressing Enter. In either case you will be asked to confirm your passphrase (by re-entering it if you used one, or pressing Enter again in case you did not).

Subsequently, your keys will be created and saved in the directory you specified (~/.ssh by default). You can have your machine print out your public key for you by using the command:

$ cat ~/.ssh/id_rsa.pub

The output will look approximately like this:

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCj8ZHA1ehuCwXvEzyG20Cv0SX1BZ9uyXvON4mDOJJHtG7WolOZG0QPYEPpNxUIFuuvYYl/ffNrV9v2cXyit28N28kqHprGlQK43r9poLACIU4BA6uFIFp5++tEsAiM0bCbQlExcZvxvQQONY8Slrl9/2kbEwFSnYdY9ORQxYsxB0gHAaDq8KFj6XQXZlyrLC46uoUDvF9DJOYmRBV/6gieWfPo3jaLS6S7mLICSB3jUK81ZD5D7IJrh1kifahmSyaui1kU4PxmmqdwPG8sFGhTsZTCavngYNzNaK1XhTeUppHblDuQUc6Z02K62Od6LMgk7khdrFlBrzpt5Yds3CztTiJ1PI1XKawhRLEMJe4ekXg+i+bz8vmuMiOrnzrK4U/GCs2a7pjx2mC4WBDd7xJKwYh9HMmLAT9l0VKH+BwEBJXq/0EqKDvMwpUn1h3HQey+Rcujf77IX+eSafyg762OKTRAniCSuhiH2jUWEzhj7cjTRIllxwXOBUUS6FtUYBUQ/sBE3bMmY85VMyF+6z6iiep7VZ9vBMNJtuol2k1wKsrrD3Finynr8gPqO2ghjK+ZvkxjgYANvV+gSvWVo2R8H1FUGA2pJegEkFNKONCyyd6xMWR5loh9NkG0UQpSk95kJH2q0QbaCrxLdPqqGY6UWp1zbXNMk33FeBv0XjjI+w== anne@farragut