Monitoring, Management & Location Tracking

 View Only
last person joined: one year ago 

Articles relating to existing and legacy HPE Aruba Networking products and solutions including AirWave, Meridian Apps, ALE, Central / HPE Aruba Networking Central, and UXI / HPE Aruba Networking User Experience Insight

Airwave - How to use SSH keys on Airwave? 

Jul 03, 2014 09:54 PM

An SSH key will let you automatically log into your Airwave server from one particular computer without needing to enter your password. This is convenient if you make frequent SSH and scp connections to your Airwave server. You should create an SSH key on your computer, and then configure your Airwave server to accept it.

 

This will allow you to automatically log into your Airwave server from this computer, without being prompted for your password.

 

 

Step1: This step is run on your Airwave server. Log into your Airwave server via SSH with your desired SSH user - root or a domain user - and execute the following command:
 

 

#mkdir ~/.ssh
 

 

Step2: This step is run on your local computer. Generate a key on your local computer, using strong encryption:
 

 

#ssh-keygen -t rsa -b 2048 -f ~/.ssh/id_rsa -C "Enter an optional comment about your key"
 

 

You should receive a prompt similar to the following. Please use a strong password. If you plan on using your key for automated tasks that don't require interaction, such as rsync, you might want to leave this blank:
 

 

Output:
 

 

Enter passphrase (empty for no passphrase)

 

Once you have entered your password twice, you should see output similar to:

 

Output:

 

Your identification has been saved in /Users/username/.ssh/id_rsa.

 

Your public key has been saved in /Users/username/.ssh/id_rsa.pub.
 

 

The key fingerprint is:

 

60:b5:c1:b7:ee:ab:31:d1:70:d8:03:41:df:0f:08:eb Enter an optional comment about your key

 

The key's randomart image is:

 

+--[ RSA 2048]----+

 

| .=. |

 

| . B o |

 

| X B o |

 

| o X o o |

 

| E S . |

 

| o |

 

| o . |

 

| + |

 

| ..o. |

 

+-----------------+

 

Step3: This step is run on your local computer. Make sure your .ssh directory and the files it contains have the correct permissions:
 

 

#chmod 700 ~/.ssh && chmod 600 ~/.ssh/*
 

 

Step4: This step is run on your local computer. Upload your public key to your server. The command below reads the content of the key you just created on your computer, and appends that key to the authorized_keys file on your server. If you don't have an existing authorized_keys file, it creates one.
 

 

Replace example.com with your domain:
 

 

#cat ~/.ssh/id_rsa.pub | ssh root@example.com 'cat - >> ~/.ssh/authorized_keys'
 

 

Step5: This step is run on your Airwave server. Make sure your .ssh directory on the server, and the files it contains, have the correct permissions:
 

 

#chmod 600 ~/.ssh/authorized_keys && chmod 700 ~/.ssh/
 

 

You should now be able to log into your server from this computer without being prompted for a password.
 

 

Note: Step 4 and Step 5 will upload the public key to the .ssh directory on Airwave.

 

Statistics
0 Favorited
8 Views
0 Files
0 Shares
0 Downloads

Related Entries and Links

No Related Resource entered.