2015-10-06 06:36 PM
Hi Powershell Experts,
I am looking for the powershell cmdlet that does the following cli equivalent.
security login publickey create -username (account) -comment (change control #) -vserver (clustername) -index 0 -publickey (ssh key)
If there is none, I will use the Inovke-NcSsh. But before that wanted to check with the experts.
2015-10-07 05:41 AM
Unfortunately, there is no direct powershell commandlet for this. What I have done to get around this is to utilize the "invoke-ncssh" command to run the command. Sorry to be a disappointment in this area.
2015-10-07 08:45 AM
I'm not sure this is an answer but I did just read the Toolkit announce in the forum on DataONTAP PSTK 3.3 (inside new NetApp ontap/santricty/mars PSTK) which ays with ontap 8.3.1 and this new TK there are 7 new 'Security Key Mgmt' cmdlets.
2015-10-07 10:01 AM
Thats what I ended up doing...
$command = "security login publickey create -username $($userList.userName) -index 1 -publickey ""$($userList.publicKey)"""
Do note the multiple quotes around the key.
2015-10-09 05:21 AM
'New-NcUser' will allow you to create the user and allow publickey as an authentication method, but it doesn't allow you to upload your public key. (At least in any combination I have tried)
2015-10-10 05:58 PM
I looked at the 3.3 toolkit and the new security key items are for the key server options for running encrypted disks, so that doesn't look like it will help. It looks like the suggestion that Adai has for you above is the best way to get this done now.