LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-14-2007, 08:30 AM   #1
tsollen
LQ Newbie
 
Registered: Jun 2007
Distribution: RHEL 4
Posts: 1

Rep: Reputation: 0
Question ssh


I did the following steps on RHEL 4 server. I could then execute “ssh fatwire@XYZ” and I didn’t need to enter any pass phrase or password. This is exactly what I was looking for. I could then create a cron job on the client (ABC) that executes some steps locally and then executes some commands on the remote server (XYZ). I thought I was done but, apparently the “exec ssh-agent bash” needs executed for each session and then the ssh-add needs run and the pass phrase supplied. This is not what I was expecting. Is this the tool I should be using to execute commands on a remote server without having to supply password/phrases at run time? If so, how do I get the ssh-agent and ssh-add commands to be persistent between logons. I can put the ssh-agent command in the bash_profile but, the ssh-add seems to only work interactively. Is there a way to execute ssh-add and pass in the pass phrase?

Start an SSH session from the client machine (ABC) to the remote machine (XYZ).

Answer Yes to question asking if you want to add the remote to a list of known hosts.

Create a key. From the client machine (ABC) enter “ssh-keygen –t dsa”.

Copy the file to the remote machine (XYZ).
scp ~/.ssh/id_dsa.pub fatwire@XYZ:.ssh/authorized_keys

Change permissions on remote machine.
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys

Start ssh-agent on client machine (ABC) if not running.
exec ssh-agent bash

Add the remote machine (XYZ) to the client’s (ABC) list.
ssh-add
Enter passphrase

Thanks for any and all help.
 
Old 06-14-2007, 08:49 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
you shouldn't need anything additional to get preshared key authentication at all. does it not still work without the ssh-agent stuff? I've certainly never needed it.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
open-ssh vs. commercial ssh (tru64), public-key auth not possible? cf050 Linux - Networking 8 03-28-2012 11:15 AM
ssh-agent, ssh-add and ssh-keygen AND CVS raylpc Linux - General 2 11-19-2008 02:50 AM
setting up an ssh soxy or local ssh tunnel from within an ssh soxy Mangenius Linux - Networking 0 03-05-2007 03:15 PM
Mac OS X ssh client / linux sshd : ssh hangs/disconnects Apollo77 Linux - Networking 1 05-24-2006 11:53 AM
Passwordless SSH with SSH commercial server and open ssh cereal83 Linux - General 7 04-18-2006 12:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration