mirror of
https://github.com/PowerShell/Win32-OpenSSH.git
synced 2025-07-23 22:15:37 +02:00
add secured protection link
parent
d958783251
commit
9fb92f62aa
@ -13,9 +13,9 @@
|
||||
***
|
||||
1. Copy `id_rsa.pub` (client's public key) to corresponding user's directory on ssh server machine
|
||||
* as `%systemdrive%\users\<user>\.ssh\authorized_keys` (path on the ssh server machine)
|
||||
2. Adjust permissions on authorized_keys file
|
||||
2. Make sure the authorized_keys file is [secured](https://github.com/PowerShell/Win32-OpenSSH/wiki/Security-protection-of-various-files-in-win32-openssh)
|
||||
```
|
||||
$authorizedKeyPath = "%systemdrive%\users\user\.ssh\authorized_keys"
|
||||
$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)
|
||||
@ -27,10 +27,10 @@
|
||||
|
||||
1. Generate a key pair on the client:
|
||||
* `ssh-keygen -t rsa -f id_rsa`
|
||||
2. Register private key with ssh-agent (for single sign-on experience)
|
||||
2. Register [secured](https://github.com/PowerShell/Win32-OpenSSH/wiki/Security-protection-of-various-files-in-win32-openssh) private key with ssh-agent (for single sign-on experience)
|
||||
* `net start ssh-agent`
|
||||
* `ssh-add id_rsa`
|
||||
3. Login using private key
|
||||
3. Login using [secured](https://github.com/PowerShell/Win32-OpenSSH/wiki/Security-protection-of-various-files-in-win32-openssh) private key.
|
||||
* `ssh -i .\id_rsa user@host` (work group user)
|
||||
* `ssh -i .\id_rsa -l user@domain host` (domain user)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user