- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Shell question (rexec)
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
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
10-30-2001 08:26 AM
10-30-2001 08:26 AM
Shell question (rexec)
But did not find any solution to authenticate myself ; here is the tests i made :
srvA>rexec srvB -l logB pwd << !
`echo $pass`
!
-> then i'm asked for the password
srvA>echo $pass | rexec srvB -l logB pwd
-> idem
Any idea ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2001 08:30 AM
10-30-2001 08:30 AM
Re: Shell question (rexec)
I would recommend installing Secure Shell and using that to perform trusted remote execution type commands.
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2001 08:33 AM
10-30-2001 08:33 AM
Re: Shell question (rexec)
.rhosts is the file that should take care of your problem
-USA..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2001 08:36 AM
10-30-2001 08:36 AM
Re: Shell question (rexec)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2001 08:36 AM
10-30-2001 08:36 AM
Re: Shell question (rexec)
The rexec command works the same as remsh except that it uses the rexec() library routine and rexecd for command execution (see rexec(3N) and rexecd(1M)) and does not support Kerberos authentication. rexec prompts for a password before executing the command instead of using hosts.equiv for authentication. It should be used in instances where a password to a remote account is known but there are insufficient permissions for remsh.
Think you'll have to use a password with rexec.
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2001 06:20 AM
10-31-2001 06:20 AM
Re: Shell question (rexec)
1) i want to perform a remote shell execution
2) i do not want to use a .rhosts file, users have to authenticate themselves
3) i do not want user to be able to show the password by using the ps command
Any idea ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2001 06:31 AM
10-31-2001 06:31 AM
Re: Shell question (rexec)
I'm using the following unix expect script to interact the Oracle
sqlplus utility. Sqlplus prompts for a password, expect sends the password,
then I 'interact'. Most of the time this works, but every once in a
while, the password shows on the screen, and expect just sits there
waiting for something, and doesn't make it to interact. If I put in a
'sleep 1', I don't have this problem, but am not sure why. Any
pointers? I'd like to (1) avoid the delay if possible, and (2) insure
that the password never shows even with the 'sleep', but without knowing
what's happening, I'm not confident that 'sleep 1' will always work.
#!/usr/local/bin/expect --
set usern "testuser"
set passw [exec aprogramtogetpassword $usern]
set timeout -1
eval spawn sqlplus $usern
log_user 0
expect "Enter password: "
# why do I need the following sleep?:
sleep 1
send "$passw\r"
log_user 1
expect {
"Enter user-name: " exit
"Connected"
}
interact
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2001 06:47 AM
10-31-2001 06:47 AM
Re: Shell question (rexec)
The easiest way to install ssh is to get the depots from the hpux porting site.
http://hpux.connect.org.uk/
get openssh, openssl, and zlib
Either make them a depot, or install seperately with openssh being the last install because of dependencies. I'll attach my notes for installation and setting up a trust based on keys
Of course hostnames and domains have been changed to protect the guilty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2001 10:01 AM
11-11-2001 10:01 AM
Re: Shell question (rexec)
Sorry that I did not see you request earlier. With HP-UX, you can write a C program to carry out rexec commands without having to enter the password.
Compile it using the HP bundles C compiler by typing cc remex.c -o remex.
For use:
remex myhost "/sbin/ioscan -ufnCdisk" -q
It is quite secure as the way that I encode the password into it means that srunning a strings on the binary will not revel the password.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2001 10:07 AM
11-11-2001 10:07 AM
Re: Shell question (rexec)
I seem to have problems attaching the source code in the forum area.
Lets try again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2001 12:34 PM
11-11-2001 12:34 PM
Re: Shell question (rexec)
This thread, although covering telnet, covers the same. You need expect, tcl, and tk:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,11866,0x54e2c6af36b7d5118ff10090279cd0f9,00.html
live free or die
harry