You are not logged in.

#1 2011-03-10 23:01:28

alperenel
Member
From: Turkiye
Registered: 2011-02-05
Posts: 36
Website

[SOLVED] Problem with adding a SSH connection to startup

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

#2 2011-03-10 23:31:02

xxxspuddy
Member
Registered: 2007-05-15
Posts: 57

Re: [SOLVED] Problem with adding a SSH connection to startup

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

#3 2011-03-10 23:43:27

alperenel
Member
From: Turkiye
Registered: 2011-02-05
Posts: 36
Website

Re: [SOLVED] Problem with adding a SSH connection to startup

yes i tried and i also handled passwordless login but it still doesnt connect :S

Offline

#4 2011-03-10 23:53:52

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: [SOLVED] Problem with adding a SSH connection to startup

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

#5 2011-03-11 00:06:33

alperenel
Member
From: Turkiye
Registered: 2011-02-05
Posts: 36
Website

Re: [SOLVED] Problem with adding a SSH connection to startup

cactus wrote:
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

#6 2011-03-11 00:10:00

alperenel
Member
From: Turkiye
Registered: 2011-02-05
Posts: 36
Website

Re: [SOLVED] Problem with adding a SSH connection to startup

ok i added the

ssh -fN -D 9292 remoteuser@remotehost

to ~/.bash_profile and it woked thanks big_smile.

Offline

#7 2011-03-11 00:10:34

whatshisname
Member
Registered: 2010-04-24
Posts: 162

Re: [SOLVED] Problem with adding a SSH connection to startup

[Solved post was posted 30 seconds  before I posted my wrong suggestion! :-) ]

Last edited by whatshisname (2011-03-11 00:12:57)

Offline

#8 2011-03-11 00:14:58

alperenel
Member
From: Turkiye
Registered: 2011-02-05
Posts: 36
Website

Re: [SOLVED] Problem with adding a SSH connection to startup

thanks anyway big_smile  it doesnt mean your sugesstion is wrong.  big_smile

Offline

Board footer

Powered by FluxBB