-1

I'm having this issue where when I try to use sudo to rcp some files from a Linux host to an HP-UX host (note that the destination directory requires root access to write to), I get the following error from HP-UX's side:

remshd: Login incorrect.

I should note that the passwords for the Linux host and the HP-UX host are different. The command doesn't seem to give me a chance to enter the proper HP-UX password and automatically defaults to this error.

Mark Henderson
  • 68,316
  • 31
  • 175
  • 255
Justin
  • 101
  • 2
  • Is root login disabled? Can you login as root locally (i.e., as a login shell), or ssh from root to root? – Andrew M. Jun 28 '12 at 00:18
  • [Please do not cross post](http://superuser.com/questions/442392/how-to-use-sudo-with-rcp-command-to-copy-files-from-linux-host-to-hp-ux-host). Server Fault is the correct place for this question. – Mark Henderson Jun 28 '12 at 03:27

1 Answers1

2

The rcp man page says

Rcp does not prompt for passwords; it uses Kerberos authentication ...

You'll probably find it easier to use scp to do this. If you allow root logins via ssh on ypor HPUX system then

scp -r /local/path root@hpux.tld:/remote/path

should do the trick. If you don't allow root logins then login to the HPUX host and obtain a root shell then

scp -r user@linux.tld:/remote/path /local/path 
user9517
  • 114,104
  • 20
  • 206
  • 289