Would you like to learn how to upload files to an SSH server using Powershell? In this tutorial, we are going to show you how to use Powershell to upload files to an SSH server using the command line on a computer
• Windows 2012 R2
• Windows 2016
• Windows 2019
• Windows 10
Equipment list
Here you can find the list of equipment used to create this tutorial.
This link will also show the software list used to create this tutorial.
Related tutorial – PowerShell
On this page, we offer quick access to a list of tutorials related to PowerShell.
Tutorial Powershell – Upload files to SSH server
As an Administrator, start a new POWERSHELL command-line prompt.
Install the required Powershell module.
Confirm the installation of NUGET.
Confirm the installation of the package repository.
Allow the execution of Powershell scripts.
Import the Powershell module named POSH-SSH.
List all commands available on the Powershell module.
Here is the command output.
Upload a file to the SSH server.
Enter the credential to the SSH connection.
Here is the command output.
In our example, we uploaded a text file named TEST from the root of drive C to the SSH server.
Optionally, upload a file to the SSH server using a stored credential.
There are multiple ways to use Powershell and a stored credential.
Congratulations! You are able to upload files to the SSH server using Powershell.