You are not logged in.
Hi guys. I have a problem with adding ssh connection to startup. i want this command to run before kde login screen and keep running all time.
ssh -D 9292 remoteuser@remotehost
but it doesnt connect. Thanks for help!
Last edited by alperenel (2011-03-11 00:10:27)
Offline
Have you tried adding the command to /etc/rc.local ? Root would need to have a passwordless login to remotehost for it to work
A temporary file is just a pipe with an attitude and a will to live.
Offline
yes i tried and i also handled passwordless login but it still doesnt connect :S
Offline
ssh -fN -D 9292 remoteuser@remotehost
you need -f, which sends ssh to the background, and -N which does not execute a remote command.
If you need it to run as a user other than root, then you probably need to utilize su as well.
Last edited by cactus (2011-03-10 23:55:06)
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline
ssh -fN -D 9292 remoteuser@remotehost
you need -f, which sends ssh to the background, and -N which does not execute a remote command.
If you need it to run as a user other than root, then you probably need to utilize su as well.
it didnt work either. i am putting it in rc.local but doesnt work.
Offline
ok i added the
ssh -fN -D 9292 remoteuser@remotehost
to ~/.bash_profile and it woked thanks .
Offline
[Solved post was posted 30 seconds before I posted my wrong suggestion! :-) ]
Last edited by whatshisname (2011-03-11 00:12:57)
Offline
thanks anyway it doesnt mean your sugesstion is wrong.
Offline