-
Notifications
You must be signed in to change notification settings - Fork 780
ssh.exe examples
bagajjal edited this page May 24, 2017
·
38 revisions
- Workgroup users
ssh user@host
- Domain users: Domain needs to be explicitly specified. Any of the following formats work
ssh -l user@domain host
ssh domain\user@host
ssh user@domain@host
- Generate a key pair on the client:
- Register secured private key with ssh-agent (for single sign-on experience)
net start ssh-agent
ssh-add id_rsa
- Login using secured private key
-
ssh -i .\id_rsa user@host
(workgroup user) -
ssh -i .\id_rsa -l user@domain host
(domain user)
-
- Copy
id_rsa.pub
(client's public key) to corresponding user's directory on the SSH server at%systemdrive%\Users\<user>\.ssh\authorized_keys
- Make sure the authorized_keys file is secured (you may need to re-ACL it) and "NT Service\sshd" has Read access to it
$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
The Modern Unix Rosetta Stone includes PowerShell examples of common Unix and Linux commands.
- MSI Install Instructions
- Script Install Instructions
- Alternative installation using the universal installer
- Retrieving download links for the latest packages