Operating System - HP-UX
1826103 Members
4769 Online
109690 Solutions
New Discussion

SSH to a HP-UX Server works Interactively but not via a script, batch, at from Windows

 
Alzhy
Honored Contributor

SSH to a HP-UX Server works Interactively but not via a script, batch, at from Windows

And it just times out with a syslog entry like so:

Aug 9 03:45:53 pluto sshd[397]: fatal: Timeout before authentication for 10.234.63.59
Aug 9 03:56:37 pluto sshd[5212]: fatal: Timeout before authentication for 10.234.63.63


Anyone have any ideas how/where to troubleshooot?

Hakuna Matata.
8 REPLIES 8
RAC_1
Honored Contributor

Re: SSH to a HP-UX Server works Interactively but not via a script, batch, at from Windows

You need to set your ssh for password less authentication-exchange of public/private keys or with use of /etc/shosts and .shosts file.

Mos people would set it with exchange of public/private keys. Generate keys on windows and add it to authorized_keys file on hp-ux.

Anil
There is no substitute to HARDWORK
Doug O'Leary
Honored Contributor

Re: SSH to a HP-UX Server works Interactively but not via a script, batch, at from Windows

Hey;

You need to set up a public/private key pair then configure the account on the target system to use the public key.

If you've already done this, run the commands using "ssh -v" and show the resulting log output so we can see what's happening.

HTH;

Doug

------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
Denver Osborn
Honored Contributor

Re: SSH to a HP-UX Server works Interactively but not via a script, batch, at from Windows

What type of authentication method is being used for ineractive -vs- script/batch/at login? The ssh client on the windows side has the same env variables set as when you run it from the command shell, right?

In your batch job, culd you add -vvv and dump verbose output to a log file. It might help troubleshoot.

-denver
Alzhy
Honored Contributor

Re: SSH to a HP-UX Server works Interactively but not via a script, batch, at from Windows

Keys are in place.. and are not prompting for passwords.

It's just that via apps, batch, at from Windows - ssh to UNIX just times out with the above syslog entry on the destination UNIX machine.

Interactive ssh works fine however.
Hakuna Matata.
Denver Osborn
Honored Contributor

Re: SSH to a HP-UX Server works Interactively but not via a script, batch, at from Windows

what's the syntax being used in the script? You might try using the -i option and provide the full path to the sshkey and add the username as well. Agian, seeing the script's syntax for ssh and the 'ssh -vvv' debug output would help.

-denver
Alzhy
Honored Contributor

Re: SSH to a HP-UX Server works Interactively but not via a script, batch, at from Windows

Thanks for the tip.. am asking them to do a verbose ssh execution.

I think the syntax is simply ssh unixhst "some command"..

They claim as well that the batch/app only works if the account first ssh interactively and logs off.

Hakuna Matata.
generic_1
Respected Contributor

Re: SSH to a HP-UX Server works Interactively but not via a script, batch, at from Windows

I think you may need to consider using cygwin if you are launching from the windows side. This will give you a script friendly environment on the windows side :).

Cheers,
Jeff
generic_1
Respected Contributor

Re: SSH to a HP-UX Server works Interactively but not via a script, batch, at from Windows

This link has some good ssh info for cygwin. This should allow you to setup a cron that will execute whatever you want from a windows machine. http://pigtail.net/LRP/printsrv/cygwin-sshd.html