- 
                Notifications
    
You must be signed in to change notification settings  - Fork 802
 
ssh.exe examples
        Manoj Ampalam edited this page Apr 19, 2017 
        ·
        38 revisions
      
    - Work Group Users:
ssh user@host
 - Domain Users: Any of the following formats:
ssh -l user@domain hostssh domain\user@hostssh user@domain@host
 
- Generate a key pair on the client:
ssh-keygen.exe -t rsa -f id_rsa
 - Register private key with ssh-agent (for single sign-on experience)
net start ssh-agentssh-add.exe id_rsa
 - Copy 
id_rsa.pub(client's public key) to corresponding user's directory on ssh HOST- as 
%systemdrive%\users\user\.ssh\authorized_keys 
 - as 
 - 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
- 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) 
 - 
 
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