Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using SSH to Access cs1000 pbx in PowerShell

Status
Not open for further replies.

Adman11

Technical User
Apr 25, 2015
4
CA
Good Morning All,

I have been working on a powershell script to change the date on our cs1000 pbx. I am able to login to the Linux bash but once the cslogin command is executed the script hangs, however if I hit the enter key I get into the cslogin console. I have attached a screenshot.

Anyone knows why the script hangs? Any helpful feedback would be greatly appreciated.

Here's my script:

Code:
$username     = "user"
$password     = "pass"
$hostname     = "192.168.1.x"
C:\plink.exe -ssh -l $username -pw $password $hostname "cslogin"
 
 http://files.engineering.com/getfile.aspx?folder=386db8f3-83e5-4cad-8b4b-b84f090646a2&file=screenshot.png
Forget to mention that it hangs with the following meassge:

PS E:\DO NOT RUN SCRIPTS> C:\plink.exe -ssh -l $username -pw $password $hostname
"cslogin"

SEC054 A device has connected to, or disconnected from, a pseudo tty without aut
hentica
ting
 
You didn't mention the release of software, but my initial guess would be that it's rejecting based on SSH vs using RLogin. You can script a RLogin session with something like SecureCRT (I do this) or possibly putty.exe (unverified by me)

30n30w
 
Try hitting return a few times after the SEC054 message. CSLOGIN doesn't always provide a banner or anything once you're in the PBX tty.
 
How do I automate the enter key? Remember the script hangs at the SEC054 message
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top