Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 5 Next »

openSSH is a popular tool for performing operations using SSH, SCP and SFTP.  As of version 1809 of Windows 10 it actually comes bundled.  On the current version of the desktops at TC (version 1709), openSSH requires an installation as it is an optional feature.

DO NOT install the optional feature version of openSSH on your older version of Windows 10 as this version is not fully featured.  Install the latest from GitHub as per below.


Install Steps

Follow steps 1-5 from this link.  If you only want the openSSH client then this is good enough.  If you want to set up the openSSH server, generate keys, etc. then go ahead and look at the remaining steps.

You should now be able to type ssh, sftp, scp or any other openSSH commands into your command window.

Some Useful Info

Private Key Format

If you're using a private key with extension .ppk (Putty private key), this will have to be converted to openSSH format so that you can use it with openSSH.  To do this you'll have to download PuTTY and use PuTTYGen to export your key as an openSSH key as described here.

Sample Usage

If you want to send a file securely using SFTP:

  1. Set up a configuration file for your sftp connection.  Call it "config" and put it in a folder called .ssh under your user folder (eg. c:\Users\{your name}\.ssh).

    Sample file:

    Host sftp2aws
        HostName      somehost.server.transfer.ca-central-1.amazonaws.com
        IdentityFile  C:\Users\{your name}\Documents\sftpsmmstranscandsd-key
        User          sftpaws
    	HostKeyAlgorithms ssh-rsa
        Compression   yes
    • Host - alias name for your connection
    • HostName - the actual destination of the sftp server
    • IdentityFile - your private key
    • User - username
    • Rest is likely optional
  2. Create a script holding command(s) to actually send the file.
    Sample script:

    put c:\yourfiletosend.txt
    exit
  3. Run the sftp command:

    C:\>sftp -b C:\sftpScript.txt sftp2aws
  4. NOTE:  You may have to add the server's identity to known_hosts (John Sewchand (Unlicensed))
  • No labels