-
Notifications
You must be signed in to change notification settings - Fork 767
ssh.exe examples
bagajjal edited this page Apr 14, 2022
·
38 revisions
- Workgroup users
ssh user@host
- Domain users: Prior to v7.7.0.0, 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
-
ssh user@host
(works from v7.7.0.0 onwards provideduser
has no conflicts otherwise - ex.user
exists both on local account data base and on domain)
- Generate a key pair on the client (preferably with a passphrase):
ssh-keygen -t rsa -f id_rsa
- Register private key with ssh-agent (optional, for single sign-on experience)
net start ssh-agent
ssh-add id_rsa
- Login using private key
-
ssh -i .\id_rsa user@host
(workgroup user) -
ssh -i .\id_rsa -l user@domain host
(domain user)
-
- Append contents of
id_rsa.pub
(client's public key) to the following file in corresponding user's directory%systemdrive%\Users\<user>\.ssh\authorized_keys
(create one if needed). - Double check access permissions on authorized_keys (only System, Administrators and owner can have access).
icacls %systemdrive%\Users\<user>\.ssh\authorized_keys
- On a domain joined server, set GSSAPIAuthentication to
yes
in sshd_config - If sshd_config is modified then restart the sshd service
net stop sshd
net start sshd
ssh -K host
Please note you have to use the hostname instead of the username.
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