PDA

View Full Version : How to startup SSH client with public key



njosef
16-05-2005, 08:29
SSH client with public key work fine :-), but how to implement to running to startup without login admin?

Exaple:
ssh -R 50000:194.228.x.x:22 username@194.228.x.x -k /etc/public_rsa_key

thanks for all!!!
:-)

njosef
16-05-2005, 15:12
Hi, please help!

cat /usr/local/sbin/post-boot
#!/bin/sh
ssh -R 30000:127.0.0.1:22 -i /etc/dropbear_rsa_host_key username_real@194.228.x.x

or

cat /usr/local/sbin/post-mount
#!/bin/sh
ssh -R 30000:127.0.0.1:22 -i /etc/dropbear_rsa_host_key username_real@194.228.x.x

NOT WORK!!!
Thanks for help!!! :rolleyes:

RoofCat
16-05-2005, 15:55
For me following code in post-mount works fine:


while :
do
ssh -i /usr/local/root/.ssh/identity -R 2222:localhost:22 remote_user@remote_host.in.the.net ping -i 300 localhost
echo "SSH exited" >> /tmp/syslog.log
sleep 30
done

given that asus's public key has been properly added to ~remote_host/.ssh/authorized_keys.

After that if I want to access asus from remote host, I login there, and use
ssh -p 2222 admin@localhost

Ping -300 .. is necessary to prevent tunneling ssh from being murdered for inactivity.

SO it goes,
Roofcat

njosef
16-05-2005, 23:17
Hi! thanks very much !!! This is work fine !!!
;)