mirror of
https://github.com/PowerShell/Win32-OpenSSH.git
synced 2025-07-27 07:54:50 +02:00
Updated ssh.exe examples (markdown)
parent
3489139896
commit
5b881de8ef
@ -17,7 +17,14 @@
|
||||
* `ssh-add.exe id_rsa`
|
||||
3. Copy `id_rsa.pub` (client's public key) to corresponding user's directory on ssh HOST
|
||||
* as `%systemdrive%\users\user\.ssh\authorized_keys`
|
||||
4. Login using private key
|
||||
4. Adjust permissions on authorized_keys file
|
||||
``` $authorizedKeyPath = "%systemdrive%\users\user\.ssh\authorized_keys"
|
||||
$acl = get-acl $authorizedKeyPath
|
||||
$ar = New-Object System.Security.AccessControl.FileSystemAccessRule("NT Service\sshd", "Read", "Allow")
|
||||
$acl.SetAccessRule($ar)
|
||||
Set-Acl $authorizedKeyPath $acl
|
||||
```
|
||||
5. Login using private key
|
||||
* `ssh.exe -i .\id_rsa user@host` (work group user)
|
||||
* `ssh.exe -i .\id_rsa -l user@domain host` (domain user)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user