OT: ssh between linux and sco unix

Tom Aldridge toma at aldridgeinc.com
Thu Dec 10 11:12:43 PST 2009


On 12/10/2009 12:06 PM, Jose Lerebours wrote:
>
> Tom,
>
> I am still required to enter a password to run shell scripts/commands
> off remote server.
>
> If I type     ssh web at unix l /tmp
>
> I have to type password for user "web" as defined in the SCO box.
> Please notice the
> "unix" in web at unix is pointing to the SCO UNIX box.
>
> I really need this to work without having to enter the password - If I
> get this done, I
> will finish my project in matter of hours ...
>
> Regards,
>
> Jose

Jose,

What I gave you was for automated ssh logins for an rsync backup. 
However, I also have numerous linux boxes logging with no password to a 
server to run filePro stuff. However the process is essentially the same 
as per below.

Before you read that though: 1) what is your command for logging in? 
Mine for example is along the lines of: "ssh -t login at domain.com 
'/usr/apps/script'". 2) Possibly you need to clear the known_hosts file 
and then remake and recopy your authentication key. 3) Other than that, 
maybe an ssh version issue? Anyway...

SSH NO PASSWORD LOGIN -- EXAMPLE

1) At local box, copy the known_hosts file to known_hosts-bak and clear 
the contents of known_hosts

b) Generate a pair of authentication keys. Do not enter a passphrase:
$ ssh-keygen -t rsa

2) ssh into remotebox

a) On remotebox, create the .ssh directory under users directory and set 
permissions and ownership (the directory may already exist obviously). 
If not:
# cd /home/username; mkdir -p .ssh;
chown -R username /home/username/.ssh; chgrp username 
/home/username/.ssh; chmod 755 /home/username; chmod -R 700 
/home/username/.ssh

3)  Exit from remotebox and back at localbox, append localbox's new 
public key to the authorized_keys file on remotebox (be sure be in the 
localbox's home directory:

$ cd /home/user; cat .ssh/id_rsa.pub | ssh user at remotebox.com 'cat >> 
.ssh/authorized_keys'

You will be prompted to enter localbox's password one last time. From 
now on you should be able to log into remotebox without a password.

Tom


More information about the Filepro-list mailing list