Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
powershell cmdlet for security login publickey cli
2015-10-06
06:36 PM
7,825 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Thanks
Adai
7 REPLIES 7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I haven't had much luck searching as well.
Im curious if this is going to be for a domain implementation for ssh keys
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thats what I ended up doing...
$command = "security login publickey create -username $($userList.userName) -index 1 -publickey ""$($userList.publicKey)"""
Invoke-NcSsh $command
Do note the multiple quotes around the key.
Regards
Adai
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Does New-NcUser get you what you are looking for?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
'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)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.