![]() pem key file and run these commands, you’ll be good to go. You can replace $acl.Owner with $env:UserName to give permission to current user $ace = New-Object -ArgumentList $acl.Owner, "Read", "Allow"$acl.AddAccessRule($ace) #Save ACL to file/folderSet-Acl -Path $path -AclObject $acl $path = "Path\to\your\ssh_key.pem" #Get current ACL to file/folder $acl = Get-Acl $path #Disable inheritance and remove inherited permissions $acl.SetAccessRuleProtection($true,$false) #Remove all explict ACEs $acl.Access | ForEach-Object #Create ACE for owner with read-access. So, I have noted down a list of PowerShell commands to do this. That’s not enough though, just like you use chmod 400 for the permissions on Linux, you need to do a similar thing on Windows as well. Yes, windows now have support for ssh in PowerShell. ![]() What if you just want to use PowerShell for your ssh command. These tools are great and have some additional features as well. ![]() ![]() For example, you might be using PuTTy or MobaXterm already. For all those who want to work with remote Linux servers from their Windows computer, there are several ways to connect. ![]()
0 Comments
Leave a Reply. |