cancel
Showing results for 
Search instead for 
Did you mean: 

ssh password less login

SOLVED
Go to solution
Harikrishnan L
Frequent Advisor

ssh password less login

Hi Folkes,

I need to login to the remote unix machine with out password.

for thet i did:
$ssh-keygen -t rsa
is crested the id.rsa and id.rsa.pub


Then i copyed the .pub file to my local unix server in my login profile as .ssh/authorized_keys


now i tried to connect the server auser@hostname using.

ssh user@hosta


suggest me to do the correct setting
10 REPLIES
bullz
Super Advisor
Solution

Re: ssh password less login

Afetr the ssh-keygen

su - user
cat .ssh/id_dsa.pub | ssh username@xx.xx.xx.xx 'cat >> .ssh/authorized_keys'

First time it will prompt for password for copying
.ssh/authorized_keys'

Then u can log without password.

Harikrishnan L
Frequent Advisor

Re: ssh password less login

hi thanks for you replay.


cat .ssh/id_dsa.pub | ssh username@xx.xx.xx.xx 'cat >> .ssh/authorized_keys'


in that
username@xx.xx.xx.xx is for which host same host ip or the client host ip need to use?
Harikrishnan L
Frequent Advisor

Re: ssh password less login

Hi All,

My requirement is.

I want to login from all users of server B and server C to the the server A's user X.

Where i have to generate the key and how do i store the password of server A's user X , and how can i login from server b and c with out password.

Thanks,

Harikrishnan.L
Nath_3
Frequent Advisor

Re: ssh password less login

Hi Hari,

Could you pls be more specific on how you want to login.

Thanks
Ravi
Steven Schweda
Honored Contributor

Re: ssh password less login

> Could you [please] be more specific [...]

... about _everything_?

> [...] the remote unix machine [...]

What, exactly, is "the remote unix machine"?

uname -a

> I want to login from all users of server B
> and server C to the the server A's user X.

What are the client systems ("server B" and
"server C")?

> Where i have to generate the key [...]

With some exceptions, no one cares where you
generate the keys. Who does what where
depends on who is trying to keep what secret
from whom. Normally, the client makes the
keys, keeps the private key data, and sends
the public key data to the server. But, if
you don't care who sees what, then you could
make all the keys anywhere, and copy
everything to where it is needed.


> now i tried to connect the server
> auser@hostname using.
> [...]

And what, exactly, happened when you did
that?

Normally, adding "-v" (or "-vv", or "-vvv")
to an "ssh" command will provide some useful
diagnostic messages.

A Forum search should find many old threads
where practically all of this has been
explained many times. "man ssh" may also
have some value.
SoorajCleris
Honored Contributor

Re: ssh password less login

Hi I got this from ITRC forum only , please find the attached doc with the procedure.

I think this will help

Regards,
Sooraj
"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity" - Dennis Ritchie
Steven E. Protter
Exalted Contributor

Re: ssh password less login

Shalom,

I like this procedure:
http://www.hpux.ws/?p=10

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
Suraj K Sankari
Honored Contributor

Re: ssh password less login

Hi,

In order to set up ssh to only accept login by public key and not interactive login, the following changes are needed to sshd_config

PermitRootLogin without-password

Change: (remove the # and save the file)
#PubkeyAuthentication yes
to
PubkeyAuthentication yes

You must restart the sshd daemon next to implement:
hp-ux(HP may change this with no notice):
/sbin/init.d/secsh stop
/sbin/init.d/secsh start

Make sure you have placed a public key file from a system you want to login and tested it first or your access will be console, hands on the keyboard only. That can be a big problem on remote systems.

Suraj
Chandrahasa s
Valued Contributor

Re: ssh password less login

Hi,

Find attached file will help you,

Chandra
madhuchakkaravarthy
Trusted Contributor

Re: ssh password less login