Operating System - HP-UX
1831349 Members
3001 Online
110024 Solutions
New Discussion

Re: ssh-agent 'how to start'

 
SOLVED
Go to solution
Dan Matlock_1
Regular Advisor

ssh-agent 'how to start'

I must be missing something, on my linux the ssh-agent is running and not sure who/how it started (good thing), but not sure how to start the ssh-agent on HP-UX. Help!
12 REPLIES 12
Marvin Strong
Honored Contributor
Solution

Re: ssh-agent 'how to start'

well assuming your sshd is running. you have your keys and everything else setup. You just run ssh-agent as yourself and add your key.

personally I have the following in my .profile so I do not need to start it manually everytime.

ssh_conf() {
if [ -f ~/.ssh/agent_env ]
then
. ~/.ssh/agent_env > /dev/null
if ! kill -0 $SSH_AGENT_PID > /dev/null 2>&1; then
echo "spawning new agent"
eval `ssh-agent | tee ~/.ssh/agent_env`
ssh-add
fi
else
echo "starting ssh-agent"
eval `ssh-agent | tee ~/.ssh/agent_env`
ssh-add
fi
}
RAC_1
Honored Contributor

Re: ssh-agent 'how to start'

ssh-agent??
Are you talking about sshd daemon??
On hp-ux (is you installed hp's ssh version)
it is started as follows.

/sbin/init.d/secsh start
There is no substitute to HARDWORK
Alex Lavrov.
Honored Contributor

Re: ssh-agent 'how to start'

Nice book about SSH on HP-UX:

http://docs.hp.com/en/T1471-90005/index.html


And you can download openssh also:
http://hpux.cs.utah.edu/hppd/hpux/Networking/Admin/openssh-4.1p1/

Alex.
I don't give a damn for a man that can only spell a word one way. (M. Twain)
Mel Burslan
Honored Contributor

Re: ssh-agent 'how to start'

I think you meant the sshd, i.e., the daemon. It starts with :

/sbin/init.d/secsh start
________________________________
UNIX because I majored in cryptology...
Dan Matlock_1
Regular Advisor

Re: ssh-agent 'how to start'

ssh-agent is what i want to use along with 'expect' program to pass the passphrase...

had sshd running just fine...
Jeff Schussele
Honored Contributor

Re: ssh-agent 'how to start'

Hi Dan,

Well, starting the sshd daemon all depends on

A) Whether you're running the HP compiled / packaged version & in that case the start command given in earlier posts is correct with the caveat that it should have links from /sbin/rc3.d to auto-start it & /sbin/rc2.d to auto-stop it

B) Whether you've compiled / packaged it yourself as we do. In that case we use /sbin/init.d/sshd2 & link to it from /sbin/rc3.d/S300sshd2 for autostart at boot & from /sbin/rc2.d/K700sshd2 to stop it at shutdown.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Mel Burslan
Honored Contributor

Re: ssh-agent 'how to start'

If you just need the ssh agent to start and it is erroring out, the binary should be out of your default search path. In which case, you can start it with the full path name and it should be (under default installation circumstances that is) /opt/ssh/bin/ssh

So you can issue the command as :

/opt/ssh/bin/ssh -l remote_user remote_host -i identity_key_file

if you omit the -i option, the default identity file is either of the following

For ssh Ver. 1
$HOME/.ssh/id_rsa

For ssh Ver. 2
$HOME/.ssh/id_dsa


hope this helps
________________________________
UNIX because I majored in cryptology...
Dan Matlock_1
Regular Advisor

Re: ssh-agent 'how to start'

thanks for all of the input, so should the ssh-agent be running automatically? or should the .profile/user level start/stop it?
Greg Vaidman
Respected Contributor

Re: ssh-agent 'how to start'

Dan,
ssh-agent does not run automatically, at least with HP's installation of ssh. You'd normally run it from your .profile... Marvin (the first response above) had an excerpt from his .profile with how to implement that...
--Greg
Alex Lavrov.
Honored Contributor

Re: ssh-agent 'how to start'

As you can see in Marvin Strong's reply, he uses .profile for this.

Alex.
I don't give a damn for a man that can only spell a word one way. (M. Twain)
Mel Burslan
Honored Contributor

Re: ssh-agent 'how to start'

Dan,

The agent is not something like a daemon that runs in the background. It gets invoked as needed basis and when it completes its duty, it just exits. So, you need to make it available to your search path or assign an alias to it for quicker access if you do not want to start it with the full path name.

________________________________
UNIX because I majored in cryptology...
Dan Matlock_1
Regular Advisor

Re: ssh-agent 'how to start'

thanx