[rhn-users] SSH in BatchMode

Jose Antonio Fabregas Reyes josea.fabregas at ciemat.es
Tue May 23 06:33:04 UTC 2006


I think the directorio must be /etc/.ssh/
NO /etc/ssh/...

________________________________

De: rhn-users-bounces at redhat.com [mailto:rhn-users-bounces at redhat.com]
En nombre de Vikas Rawat
Enviado el: martes, 23 de mayo de 2006 8:21
Para: redhat-list at redhat.com; rhn-users at redhat.com
Asunto: [rhn-users] SSH in BatchMode



Hi All, 

We have a requirement of connecting two linux machines for executing
some scripts. These script will invoke SSH command to login to the
remote linux machine and execute some commands. We are able to do so
manually, but in batch mode (via scripts), we are prompted for a
password. To avoid it, the documentation for SSH says

1. Log in to the remote linux machine once manually, to store the RSA
key of the remote machine. After completing the step, we cross checked
and the key is rightly stored in /etc/ssh/known_hosts

2. Generate the RSA/DSA keys on the client machine and copy the public
keys on the remote machine. The public keys should be copied to a file
~/.ssh/authorized_keys on the remote machine. We have done this as well.


3. We have also changed the file/directory permission for ~/.ssh &
~/.ssh/authorized_key to be read-write for user only by executing 

>chmod -R 600 .ssh 

4. Additionally, we have created ~/.ssh/known_hosts at the client
machine containing the RSA public key of remote linux machine.

As per the documentation, we should now be able to login on the remote
linux machine without being prompted for the password. For us, we still
get a Permission denied error i.e. after invoking the following command
on client

>ssh -2o BatchMode=true -l <usrlogin> <remoteLinuxMachine> 
It results in 
> Permission denied (publickey,gssapi-with-mic,password) 

Anyone has any idea on how to get through this problem. 

The concerned files containing the appropriate debug/configuration
information are attached. 

Regards, 
Vikas 

<<ssh-debug3.log>> <<remote.sshd_config>> <<sshd-ddd.log>>
<<client.ssh_config>> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/rhn-users/attachments/20060523/9df4e3d1/attachment.htm>


More information about the rhn-users mailing list