diff --git a/ssh.exe-examples.md b/ssh.exe-examples.md index 4244cdd..e4c0591 100644 --- a/ssh.exe-examples.md +++ b/ssh.exe-examples.md @@ -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\\.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\\.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)