OT: ssh between linux and sco unix
Tom Aldridge
toma at aldridgeinc.com
Wed Dec 9 20:21:35 PST 2009
> Jose Lerebours propounded (on Wed, Dec 09, 2009 at 03:16:54PM -0500):
> | Trying to setup an UBUNTU Linux box to ssh to an SCO UNIX box without the
> | need to enter a password.
> | I found this article
> |
> | http://lani78.wordpress.com/2008/08/08/generate-a-ssh-key-and-disable-password-authentication-on-ubuntu-server/
> |
> | I followed every step but I am still forced to type in a password to connect
> | to SCO UNIX. The root of the problem is
> | the need to interface a linux server running PHP + Apache to extract and
> | push data from a SCO UNIX running filePro.
>
Jose,
Here is my working example of what I do with several machines, i.e.... I
"pull" rsync backups from a couple of machines to a machine, and I push
backups to another machine simply because I have no shell access on that
machine to set up a "pull". Been doing it on an automated basis, for
several years without any security issues that I am aware of.
Note, having identical user names on both machines is not necessary.
Permissions are critical however.
------------------------------------------------------------
Create the backup script and test it first.
Then, to automate the login process:
Create ~/.ssh on the local machine if necessary and set the permissions
to: chmod -R 700 ~/.ssh
Create the public/private keys on the local machine:
ssh-keygen -t rsa
This created two files in the ~/.ssh directory: ~/.ssh//id_rsa (the
private key) and ~/.ssh/id_rsa.pub (the public key), which you will
share with the remote host.
Now send your public key to the remote machine, so that it can trust you.
scp ~/.ssh/id_rsa.pub username at machine.domain.com:.ssh/authorized_keys2
Set the permissions on the remote machine if necessary as well: chmod -R
0700 ~/.ssh
IMPORTANT NOTE ABOUT THE PUBLIC KEY:
If you're pulling the backup to the backup machine, copy (using scp) the
same public key to each machine you're going to backup. Simply change
the username at machine.domain.com each time you run the scp string: scp
~/.ssh/id_rsa.pub username at machine.domain.com:.ssh/authorized_keys2
If you're pushing the backup to a backup machine, append the public key
to the authorized_keys file (be sure be in the home directory of the
machine your pushing from): $ cd ~/homedir; cat .ssh/id_rsa.pub | ssh
username at machine.domain.com 'cat >> .ssh/authorized_keys'
------------------------------------------------------------
Tom Aldridge
More information about the Filepro-list
mailing list