- Community Home
- >
- Servers and Operating Systems
- >
- Integrity Servers
- >
- ssh automated script with MP
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-11-2008 01:20 PM
тАО02-11-2008 01:20 PM
I have a telnet automated script that connects into MP and submits several MP commands. It's working fine.
Now I would like to use ssh instead of telnet.
I can establish a ssh session with MP from putty.
1)When I try to ssh from HP-UX 11.23 to the MP I cant establish the session:
_________________________________________
# ssh
OpenSSH_4.4p1-hpn12v11, OpenSSL 0.9.7l 28 Sep 2006
HP-UX Secure Shell-A.04.40.011, HP-UX Secure Shell version
debug1: Reading configuration data /opt/ssh/etc/ssh_config
debug3: RNG is ready, skipping seeding
debug2: ssh_connect: needpriv 0
debug1: Connecting to
[
debug1: Connection established.
debug1: permanently_set_uid: 0/3
....
....
debug1: sending SSH2_MSG_KEXDH_INIT
debug1: expecting SSH2_MSG_KEXDH_REPLY
Received disconnect from
_________________________________________
Any ideas why after "expecting SSH2_MSG_KEXDH_REPLY" the session disconnects?
2)How can I automate ssh (e.g. using here document)
I get the following message:
Pseudo-terminal will not be allocated because stdin is not a terminal.
Regards,
Joao Rei
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-11-2008 02:14 PM
тАО02-11-2008 02:14 PM
Re: ssh automated script with MP
I don't know your firmware revision.But latest firmware has some fixes about SSH in MP like below
iLO-2 MP F.02.17
* Who command now shows current user.
* Web GUI interface timeout has been increased from 5 to 15 minutes.
* Incomplete hot-key sequence on serial console is now forwarded to OS console.
* SSH now works with SSH 4.4.
* vMedia connection enabled when system power is off.
* Web power status was showing as unavailable on power off.
* Battery failure event no longer occurs on upgrade.
* Repeating CO and Ctrl-B can no longer cause an MP hang.
* Fixed SSH bad password detection.
You can check your firmware revision from MP->CM->SYSREV
The corrected firmware located in http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en&cc=us&prodTypeId=15351&prodSeriesId=3346452&prodNameId=3346456&swEnvOID=54&swLang=13&mode=2&taskId=135&swItem=ux-56643-1
and installation instructions are
http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en&cc=us&prodTypeId=15351&prodSeriesId=3346452&swItem=ux-56643-1&prodNameId=3346456&swEnvOID=54&swLang=13&taskId=135&mode=4&idx=1
I hope it will help
Best Regards
Murat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-11-2008 07:50 PM
тАО02-11-2008 07:50 PM
Re: ssh automated script with MP
Try:
$ ssh -c 3des-cbc
or another ciper from the man page, I don't remember which one to use.
2) You won't be able to automate easily commands on an MP, as here documents don't work for obvious reasons with SSH. The way I circumvented this is by creating an "operator" account on the MP with limited privileges, and automating the SSH session on it using expect. Not a best practice security-wise, but it works. I can send you an example program tomorrow if you want to. Or if you know perl, perl-expect is easier to program than vanilla expect.
Olivier.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-12-2008 04:28 AM
тАО02-12-2008 04:28 AM
Re: ssh automated script with MP
Current firmware revisions
MP FW : F.02.17
# ssh Admin@
Works fine.
Current firmware revisions
MP FW : F.01.58
# ssh -c 3des-cbc Admin@
Works fine.
_______________________________
Olivier, can you please provide an expect script example to automate ssh?
Regards,
Joao Rei
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-12-2008 05:47 AM
тАО02-12-2008 05:47 AM
SolutionP.S.: Never use expect to automate SSH sessions between hosts, it's far from being secure as the password must be stored somewhere, certificates should be used instead.