Re: SSH in BatchMode



Vikas Rawat wrote:
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>>

Although is in spanish you can try with
http://logadmin.blogspot.com/2006/05/ssh-con-clave-pblica.html
only with the bold letter would be sufficient.

Regards.
Emilio C.

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list



Relevant Pages

  • [kde-linux] Strange window behavior with KDE
    ... I have an application that needs to run remotely and be displayed back to my Linux machine (SuSE Enterprise 9.0, KDE 3.4.1), This ... The width of the scroll bar descreases each time I click on the down arrow until there is no scroll bar left. ... We do the same program from the same remote computer to an HP and it works properly. ...
    (KDE)
  • SSH in BatchMode
    ... These script will invoke SSH command to login to the ... Log in to the remote linux machine once manually, ... Generate the RSA/DSA keys on the client machine and copy the public ...
    (RedHat)
  • Re: How to remotely connect to linux machine and then use GUI software on it?
    ... decided to post "How to remotely connect to linux machine and then use GUI ... >In my school lab, there is a linux machine and I have an account on it. ... when you start the GUI app on the remote machine in the lab, ...
    (comp.os.linux.networking)
  • Remote backup
    ... Hi I need to back 10.0 GB Files from remote Linux machine to remote ... I have TAR files on A. I need to copy to B. I used ftp ... I think I can use RSYNC command or there might be other ...
    (comp.os.linux.security)
  • Re: Remote backup
    ... > Hi I need to back 10.0 GB Files from remote Linux machine to ... Even I used root user that didnot ... I've been using ssh and rsync to do somewhat similar for years. ...
    (comp.os.linux.security)