HPE 3PAR StoreServ Storage
1748181 Members
3981 Online
108759 Solutions
New Discussion

Re: HPE 3PAR passwordless ssh with setsshkey

 
SOLVED
Go to solution
fabri_b
Collector

3par passwordless ssh

Hi there,

I noticed a few scripts exist such as 

http://community.hpe.com/hpeb/attachments/hpeb/3par/1009/1/3par_create_virtual_copy.txt

which means it must be somehow possible to [ssh myuser@my3par mycommand -myoptions]  without having to manually enter a password each time.

I know this is probably supersimple, but I cannot find it anywhere, and I haven't touched the cli in a few years now, so am a little short of ideas... any help is appreciated :)

 

Thanks,

Fa

3 REPLIES 3
Sheldon Smith
HPE Pro
Solution

Re: 3par passwordless ssh

You need to set up a keypair if you don't already have one. Make the keys 2048 in length.

Login to the system. You'll need a local user with the desired role.
"setsshkey -add"
and then paste in your public key.  Note that "setsshkey" without the -add option will cause it to replace any and all existing keys for the user.

You should now be able to
ssh {user}@{system}
and connect.

And then
ssh {user}@{system} showsys

 

Note: While I work for Hewlett Packard Enterprise, all of my comments (whether noted or not), are my own and are not any official representation of the company.
----------
If my post was useful, click on my KUDOS! thumb below!


Note: While I am an HPE Employee, all of my comments (whether noted or not), are my own and are not any official representation of the company

Accept or Kudo

fabri_b
Collector

Re: 3par passwordless ssh

Thank you Sheldon, 

I was doing exactly that, except that I was assigning a name to overrid the default id_rsa.pub filename, and this was causing the problem.

As I manage a large number of 3Par, this is kind of necessary, so apparently the solution I found to this is:

ssh -i /path/to/id_rsa(not_id_rsa.pub) user@server

This seem to be the solution :)

Thank you very much for your step by step help!

 

 

Dennis Handly
Acclaimed Contributor

Re: HPE 3PAR passwordless ssh with setsshkey

>ssh -i /path/to/id_rsa user@server

 

This uses the single private key to login to the 3PAR CLI user "user".

You can eliminate the -i option and "user@" by using a ~/.ssh/config file.  But you can only use one key per server.

 

Setting up SSH access is documented in the HPE 3PAR Command Line Interface Administrator Guide:

Accessing the 3PAR CLI using SSH