Questions tagged [posh-ssh]
28 questions
0
votes
0 answers
New-SSHSession found in module Posh-ssh but could not be loaded in powershell
I want to create an ssh session using PowerShell that's why I have used the Posh-SSh module but after importing Posh-SSH, the New-SSHSession function is not loaded.
Code:
Import-Module -Name Posh-SSH
$targetServer=''
$UserName=''
$PassWord=''
$pass…

user12644602
- 11
- 2
- 7
0
votes
1 answer
Using racadm in posh-ssh and powershell
I'm running a racadm command to find the number of Core count on the Posh-Ssh module, would anyone know how to count the total amount?
$get_CoreInfo = Invoke-SSHCommand -Index 0 -command "racadm get BIOS.ProcSettings"
Core_Number =…

NW_92
- 119
- 1
- 1
- 5
0
votes
1 answer
How to install scp and ssh to Powershell?
I installed Posh-SSH with: Install-Module -Name Posh-SSH
When trying to execute scp or ssh, I am getting something like below. Why?
scp : The term 'scp' is not recognized as the name of a cmdlet, function, script file, or operable program. Check…

David
- 1,241
- 20
- 36
0
votes
1 answer
Run local python script on remote server thanks to Posh-SSH module (W10)
I want to run local python script on remote server by using Posh-SSH which is a module in Powerhsell.
This topic mention it with regular ssh by doing this:
Get-Content hello.py | ssh user@192.168.1.101 python -
I would like here to use Posh-SSH…

Martin
- 73
- 1
- 1
- 8
0
votes
1 answer
MYSQLDUMP over Powershell SSH (POSH)
I'm struggeling with this for a day now. Basically I want to backup a MySQL database on our webspace with a powershell script which runs daily on my windows computer.
When I use Putty and enter the following command, a backup file is…

Alex
- 434
- 4
- 18
0
votes
1 answer
Cant do cd via Posh-SSH on a Linux remote
I made a PowerShell script that connects to a linux pc using Posh-SSH. The script works fine but i found that i cant cd through directories for some reason.
This is how i pass the commands to Posh-SSH session:
$input = Read-Host "AutoSSH>"
$result =…

FaoMage
- 1
- 3
0
votes
1 answer
Importing Posh-ssh moudle in powershell does not import all cmdlets
I am trying to import posh-ssh moudle to upload files to sftp server. I cannot install module in my windows server 2012 R2. Hence i used save-module in my local system and tried to import the module in the server. It imports few cmdlets but does not…

Ash
- 41
- 7
0
votes
1 answer
Posh-SSH to send multiple commands to Cisco Switch
I am attempting to automate a process where I have a powershell script SSH into our cisco switch and open and close a Vlan interface. When I try to run it I get "Exception calling "EndExecute" with "1" argument(s): "An established connection was…

thatdudesebas
- 1
- 1
- 5
0
votes
1 answer
Get the Size of a File on SFTP Server using Posh-SSH
I have a posh-ssh setup that seems to be working pretty well. I'm looking to get the size of a file.
https://github.com/darkoperator/Posh-SSH/blob/master/docs/Get-SFTPContent.md
I feel like I should be able to do something like…

Daniel Williams
- 167
- 1
- 10
0
votes
1 answer
how to "sudo root" with posh-ssh (powershell)
i am using posh-ssh to connect to my ssh server do some commands start with su root,but i can not switch user to root sucessfully.
PS C:\> $rootpwdSec = ConvertTo-SecureString $rootpwd -AsPlainText -Force
PS C:\> Invoke-SSHStreamExpectSecureAction…

ncowboy
- 1,311
- 2
- 13
- 19
-1
votes
1 answer
Windows PowerShell Posh-SSH module script SFTP file-upload to Linux server giving error
I have the below powershell script to do a simple file upload from a windows machine to a remote Linux server.
$DestServerIP = 'xx.xx.xx.xx'
$user = "user"
$pass = "xxxx"
$LocalPath = "\\windows_IP\d$\file.txt"
$RemotePath = '/tmp'
try
{
…

Ibrahim Quraish
- 3,889
- 2
- 31
- 39
-1
votes
1 answer
Posh-SSH PowerShell How to get filename and status, and add line to log file
Im trying copy file to SFTP server i use posh shh and if it was successfully moved then I get the filename and add new line in Log file, otherwise i add line that file wasnt move or file not in source dir.
I understand how to copy and add line into…

Anatoliy Smirnow
- 1
- 1
-1
votes
1 answer
Posh-SSH and Cisco Gear
I've been working on doing some scripting with Powershell and the Posh-SSH module. I'm connecting to mainly Cisco gear, but have some other network gear as well. My issue seems to be that I can connect to the gear just fine, but my commands don't…

Jeremy Rogers
- 1
- 1
- 4