1827838 Members
1514 Online
109969 Solutions
New Discussion

Re: remote copy

 
sindodm
Occasional Advisor

remote copy

I want to use ssh from host A to host B with null password ,

I have already generate the public key ( ssh-keygen -t rsa ) id_rsa.pub on host A and copy it to host B and rename it to authorized_keys , but when run "ssh host B" , it still ask the password , can advise how to login with null password ? thx

orcdpss@hostB's password
6 REPLIES 6
Steven E. Protter
Exalted Contributor

Re: remote copy

Shalom,

ownership and permissions on home dirctory and .ssh is require.

Quick and dirty procedure:

hosta

scp -o d_rsa.pub hostb:/$PWD/authorized_keys

on host b

scp -o d_rsa.pub hosta:/$PWD/authorized_keys

You will need to generate new public keys, I believe your methodology overwrote the local copy.

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
sindodm
Occasional Advisor

Re: remote copy

I followed the below link to setup it , but still ask password when ssh , I also found the when use scp , it also ask for password, can advise what can I do ? thx

http://www.freebsdwiki.net/index.php/SSH:_Passwordless_authentication
sindodm
Occasional Advisor

Re: remote copy

do I need to config some file like system-auth or /etc/ssh/.... ? thx
Ivan Ferreira
Honored Contributor

Re: remote copy

Normally, this happens when StrictModes is enabled and the permissions for the files are not correct.

The StrictModes keyword, with a value of yes (the default), causes sshd to check the permissions of important files and directories. They must be owned by the account owner or by root, and group and world write permission must be disabled.


For SSH1, StrictModes checks:

* User's home directory

* User's ~/.rhosts and ~/.shosts file

* User's SSH configuration directory, ~/.ssh

* User's SSH ~/.ssh/authorized_keys file

For OpenSSH, StrictModes checks the same files as for SSH1, plus the user's authorization file for SSH-2 connections, ~/.ssh/authorized_keys2.

You could disable StrictModes in /etc/ssh/sshd_config.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Jonathan Fife
Honored Contributor

Re: remote copy

What does 'ls -al ~orcdpss/.ssh' show on hostB?
Decay is inherent in all compounded things. Strive on with diligence
Scott Palmer_1
Trusted Contributor

Re: remote copy

Sindodm,

you can start the sshd on the target server
with sshd -ddd (most verbose debugging).

then on your initiating system issue an
ssh -vvv (level 3 verbosity) and then use that to see if you are getting proper authentication.

Most of the Problems I have had with this issue involve permissions on the home directory or the .ssh directory or on the .authroized_keys file.

Regards,

Scott Palmer