- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Sending commands via ssh argument
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
Forums
Discussions
Discussions
Discussions
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
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
03-19-2004 01:59 AM
03-19-2004 01:59 AM
I can use ssh to send a telnet command to a remote host and have the login prompt returned.
Example,
From hostA as any user, ssh -l userA hostB telnet hostC after entering the password for userA I get a login prompt from hostC.
Preliminarily, I've tried rksh, removing /etc/PATH but, it seems to me that ssh only authenticates against a user (etc/passwd) but, doesn't use any shell environment. I'm perplexed.
Thanks,
Mark Castagna
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2004 02:38 AM
03-19-2004 02:38 AM
Re: Sending commands via ssh argument
1) Try pure ssh. ssh replaces telnet. you can send ssh commands in the command string ssh root@disk.itool.com "./etc/profile;ssh sys2.itool.com $commands"
2) Set up the ssh for password free authentication by exchanging public keys. See the doc I'm attaching.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2004 02:57 AM
03-19-2004 02:57 AM
Re: Sending commands via ssh argument
The login prompt from hostC is a result of the telnet command. Sending the telnet command via ssh will encrypt the connection between hostA and hostB, but the connection between hostB and hostC will remain clear text. If you are trying to eliminate the login and password prompts, then use ssh on all three hosts, along with the public keys.
AFAIK, ssh does require a valid user and will use the shell as listed in /etc/passwd. I would ssh to hostB, verify that the shell environment is correct on hostB. Then ssh/telnet to hostC and verify the shell environment on hostC.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2004 03:18 AM
03-19-2004 03:18 AM
Re: Sending commands via ssh argument
I probably didn't make myself completely clear. I don't want unscrupulous users to be able to use ssh to access telnet (or any other command).
Thanks again,
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2004 05:42 AM
03-19-2004 05:42 AM
SolutionYou should be able to configure sudo to limit your users to specific commands, as well as eliminating the ability to pass arguments. i.e., "sudo ssh hostA" would be ok, but "sudo ssh hostA ls" would not be ok.
http://hpux.connect.org.uk/hppd/hpux/Sysadmin/sudo-1.6.7p5/