Operating System - HP-UX
1834302 Members
2015 Online
110066 Solutions
New Discussion

convert rhost type commands to ssh or equiv

 
SOLVED
Go to solution
David DiBiase
Frequent Advisor

convert rhost type commands to ssh or equiv

I have an app that does:

rcp file machine:/tmp/rcp_file
remsh HOST "cmd_needs_local_file /tmp/rcp_file"

is there an SSH type alternative
14 REPLIES 14
Rick Garland
Honored Contributor
Solution

Re: convert rhost type commands to ssh or equiv

Use scp in place of rcp
use ssh in place of remsh

Steve Lewis
Honored Contributor

Re: convert rhost type commands to ssh or equiv

If you exchange public keys you should also get more confidence in the remote host being the correct server, provided you get the permissions right. There is a .shosts file that ssh supports.
If you read the help/man files on ssh and sshd, plus view the config files, you should get more info.
Definitely install ssh. Its good R+D for you and you are bound to need it soon.
Jeff Schussele
Honored Contributor

Re: convert rhost type commands to ssh or equiv

AND make sure you've passed keys between the systems so that a interactive PW is not required.
THEN get the heck rid of that .rhosts file(s) and make dang sure you remove any .netrc files.

My 2 cents,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Alessandro Pilati
Esteemed Contributor

Re: convert rhost type commands to ssh or equiv

Hi David,
refer to this manual for ssh and scp.

http://docs.hp.com/en/T1471-90013/ch01s08.html

Regards,
Alex
if you don't try, you'll never know if you are able to
baiju_3
Esteemed Contributor

Re: convert rhost type commands to ssh or equiv


You can replace rcp by scp and remsh by ssh commands .

But this will ask for authentication on remote server .

You can setup trusting based on rsa keys by ,

On Source Server ,assuming root as the user .

cd ~root/.ssh

#ssh-kegen -t rsa -b 1024

enter defaults by pressing enter key and this will generate 2 files

id_rsa and id_rsa.pub .

Append the content of id_rsa.pub from Source server to ~root/.ssh/authorized_keys file on target server .

now test by "ssh target server -n ls -al "
This command should run now w/o asking for a password.


Thanks,
-BL.


Good things Just Got better (Plz,not stolen from advertisement -:) )
Gavin Clarke
Trusted Contributor

Re: convert rhost type commands to ssh or equiv

Ooh look there's a post about configuring ssh (currently right next to your post):

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=960887
David DiBiase
Frequent Advisor

Re: convert rhost type commands to ssh or equiv

I just did a man ssh and got 'no entry'
anyone know which disk this is on or a part number that I can use to download it.

These commands are in a legacy product and we need to port them into a more secure environment.
David DiBiase
Frequent Advisor

Re: convert rhost type commands to ssh or equiv

gavin, thanks. once I find the ssh I will need to learn how to configure it ;-)
Jeff Schussele
Honored Contributor

Re: convert rhost type commands to ssh or equiv

Hi David,

SSH is available here:

http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=T1471AA

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Jeff Schussele
Honored Contributor

Re: convert rhost type commands to ssh or equiv

I guess I should add that it's *only* available from HP for 11.0/11.11/11.23
If you have 10.20 you'll have to complie your own & for that you'll have to get the source from
http://www.openssh.org

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
David DiBiase
Frequent Advisor

Re: convert rhost type commands to ssh or equiv

We are running 11.11 or .23 on rx machines
Thanks to all for your help. I guess this will keep me out of trouble for a while
Gavin Clarke
Trusted Contributor

Re: convert rhost type commands to ssh or equiv

scp comes with ssh (or is a different way of invoking it).
David DiBiase
Frequent Advisor

Re: convert rhost type commands to ssh or equiv

again thanks - i am sure I will be back
Gavin Clarke
Trusted Contributor

Re: convert rhost type commands to ssh or equiv

You might want to think about bastille too/after if you're tightening things up.