Operating System - HP-UX
1833777 Members
2200 Online
110063 Solutions
New Discussion

Re: public key authentication failing

 
ManojKumar
Advisor

public key authentication failing

Hi,

I am using public key authentication mechanism .
i am executing ssh-keygen.exe file in order to obtain the public and private keys .

if i am using default path i.e. c:\Docoment..\manojkumar\.ssh\id_rsa
only then public key authentication is working .

Problem ::

if i am using some other path e.g. "c:\key"
then it is creating public and private keys but algorithm is failing i.e. after copying the public keys on the server --password less -login is not there (it is asking for password)

Is it possible to obtain password-less-login without selecting default path .

regards,
manoj
10 REPLIES 10
Doug O'Leary
Honored Contributor

Re: public key authentication failing

Hey;

On a UNIX system, you would execute

ssh -i ${abs_path_to_private_key} -l ${user} ${host}

The help file for the ssh client you're using should be able to point you to whatever cli option or menu pick you need to do the same thing.

Doug

------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
ManojKumar
Advisor

Re: public key authentication failing

Hi,

Thanks for a quick response---
i m working on windows-- can't execute unix commands or scripts .

one more thing--- .ssh folder is a requirement or not .

regards,
manoj
Jeff Schussele
Honored Contributor

Re: public key authentication failing

Hi manoj,

It's a requirement on the HP-UX side.
It's where the key is stored.

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

Re: public key authentication failing

Thanks a lot,

can we store the keys in some other folder

manoj
Steven E. Protter
Exalted Contributor

Re: public key authentication failing

Shalom manoj,

.ssh folder is a requirement on Linux.

I've seen windows create something similar created on Windows

You should be able to find the ssh binary on windows and run the diagnostic in the previous post.

Also -vvv might be helpful to get diagnostics.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
ManojKumar
Advisor

Re: public key authentication failing

Hi,

it is possible to create the keys in some other folder but again in order to obtain a password-less-login , i have to paste the private key i.e. id_rsa into the "$HOME\.ssh" folder- then only it 'll work .

I think it is because of $HOME path----

I just want to get rid of this $HOME path - Is it possible ??????

manoj
Jeff Schussele
Honored Contributor

Re: public key authentication failing

Hi,

You have two options:
1) Change the home dir in your /etc/passwd entry
2) Specifically set a "new" $HOME in your $HOME/.profile file

Your $HOME is "assumed" to be what's in your passwd entry

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
ManojKumar
Advisor

Re: public key authentication failing

HI--

actually i am working on windows platform--

I can change the environment variables --but that is last option .

manoj
Jeff Schussele
Honored Contributor

Re: public key authentication failing

Well...are *any* HP-UX systems involved here?
You know you're in the HP-UX section I assume.
Tell us just *what* the client & server are.
That will help us help you.

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

Re: public key authentication failing

actually client is windows--but the server is a linux machine----

what i m doing is ---

i am executing ssh-keygen.exe and copying the public keys on to the server (authorized_keys) using pscp/scp---

it is working fine-----

but i want to get rid of .ssh folder and $HOME path-----

manoj