I'm trying to execute a application console command (cslogin
) on a Linux box from PowerShell. I used the SSH module from SSH.NET to access the Linux server. The following is a snapshot of my script, I'm able to establish the ssh session.
Import-Module SSH-Sessions
$user = "user"
$password = "pass"
$hostname = "192.168.1.X"
C:\plink.exe -ssh -l $username -pw $password $hostname "cslogin"
But once the cslogin
command is executed the script hangs with the following message:
SEC054 A device has connected to, or disconnected from, a pseudo tty without authenticating
At this point if I hit the enter key I am able to get the application prompt, which is what I want. I am trying to understand why does my script hangs and how do I get around this issue.