- Community Home
- >
- Servers and Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: Scripting via SSH
-
- Forums
-
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
- HPE Blog, Austria, Germany & Switzerland
- Blog HPE, France
- HPE Blog, Italy
- HPE Blog, Japan
- HPE Blog, Middle East
- HPE Blog, Russia
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
-
Blogs
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Blog, Latin America
- HPE Blog, Middle East
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
-
Information
- Community
- Welcome
- Getting Started
- FAQ
- Ranking Overview
- Rules of Participation
- Tips and Tricks
- Resources
- Announcements
- Email us
- Feedback
- Information Libraries
- Integrated Systems
- Networking
- Servers
- Storage
- Other HPE Sites
- Support Center
- Aruba Airheads Community
- Enterprise.nxt
- HPE Dev Community
- Cloud28+ Community
- Marketplace
-
Forums
-
Blogs
-
Information
-
English
- 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
- Email to a Friend
- Report Inappropriate Content
03-25-2009 12:40 AM
03-25-2009 12:40 AM
We'd like to manage our network gear (D-link' DFL) from the VMS host. The only acceptable way we see is the interactive SSH session (issue a bunch of commands and analyze the results). But how can it be accoplished from the VMS? Plain SSH command (HP TCPIP 5.4) takes only one command to run, so unusefull. C-Kermit would be the ideal candidate for the job, but it doesn't support SSH in VMS version. What else?
"-S" switch of the SSH command looks promising but the documentation is too brief about it.
"Does not request a session channel. This type of session does not disconnect automatically.". But how can it be used?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
03-26-2009 03:44 AM
03-26-2009 03:44 AM
Re: Scripting via SSH
- make an SSH-connection to the device
- issue a bunch of commands in the same connection
- get the results
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
03-26-2009 05:30 AM
03-26-2009 05:30 AM
Re: Scripting via SSH
Brute-force alternative: cURL?
The ssh manual points to the potential need for:
$ SSH -o "batchmode yes"
There are also open source versions of OpenSSH around that could be used for reference or for an alternative implementation.
And if you have an HP support contract, consider using it.
And if the OpenVMS box doesn't work sufficiently here for your needs, consider an alternate host operating system and box to serve as the network administration and management gateway. The minicom bits on an embedded box might be interesting and useful here and as a console server.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
03-26-2009 08:28 AM
03-26-2009 08:28 AM
Solutionimport paramiko
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect('rhost', username='usr', password='pwd')
stdin, stdout, stderr = ssh.exec_command("uptime")
print stdout.readlines()
ssh.close()
give
[' 17:23:24 up 32 min, 1 user, load average: 0.14, 0.33, 0.35\n']
You can find more examples on
http://jessenoller.com/2009/02/05/ssh-programming-with-paramiko-completely-different/
Jean-Francois
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
03-27-2009 05:59 AM
03-27-2009 05:59 AM
Re: Scripting via SSH
DFL-1600
> Brute-force alternative: cURL?
cURL to DFL' web management interface? It's the way I'm trying to bypass as it looks too complicated (java-script reverse engineering) and potentially unstable due to firmware updates.
> The ssh manual points to the potential need for:
> SSH -o "batchmode yes"
yes, I tried it. It works correctly from the DCL command file but executes exactly one command in one connection. I need to issue bunch of commands in one connection, otherwise DFL rollback the change[s].
> There are also open source versions of OpenSSH around that could be used for reference or for an alternative implementation.
> And if the OpenVMS box doesn't work sufficiently here for your needs, consider an alternate host operating system
Yes, I consider these ways as a last chance. I'm still trying to keep things tight as far as possible.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
03-27-2009 06:05 AM
03-27-2009 06:05 AM
Re: Scripting via SSH
Jean-François, thank you for reminder. I thought about Perl Net:SSH2 module (unfotunately it requires libssh2 library which should be found or ported myself) but definitly forgot about Python. It's worth a try. Does it require some other external libraries?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
03-27-2009 12:02 PM
03-27-2009 12:02 PM
Re: Scripting via SSH
Installation of Python required 2 LD images.
Installation documentation:
http://www.vmspython.org/DownloadAndInstallationPython
Jean-Francois
Hewlett Packard Enterprise International
- Communities
- HPE Blogs and Forum
© Copyright 2021 Hewlett Packard Enterprise Development LP