Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  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:

    Code Block
    languagebash
    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:

    Code Block
    put c:\yourfiletosend.txt
    exit
  3. Open regedit.
  4. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU.
  5. Change the value of the UseWUServer attribute to 0.
  6. In a command window run the following:
Code Block
languagebash
net stop wuauserv && net start wuauserv

Install


  1. To make sure that the OpenSSH features are available for install, run the following in powershell:

    Code Block
    languagepowershell
    Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'

    This should return the following:

    Code Block
    languagepowershell
    Name  : OpenSSH.Client~~~~0.0.1.0
    State : NotPresent
    
    Name  : OpenSSH.Server~~~~0.0.1.0
    State : NotPresent

    Then, simply install the client and/or server features as follows:

    Code Block
    languagepowershell
    # Install the OpenSSH Client
    Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
    
    # Install the OpenSSH Server
    Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0

    Both should return the following output:

    Code Block
    languagepowershell
    Path          :
    Online        : True
    RestartNeeded : False
    You should now be able to type ssh, sftp, scp or any other openSSH commands into your command window.

    Run the sftp command:

    Code Block
    C:\>sftp -b C:\sftpScript.txt sftp2aws


  2. NOTE:  You may have to add the server's identity to known_hosts (John Sewchand (Unlicensed))