LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 04-20-2005, 04:28 AM   #1
bruse
Member
 
Registered: Feb 2005
Location: internet
Distribution: Debian
Posts: 821

Rep: Reputation: 30
starting sshd how to..


i am using mandrke 10.0 +KDE.

how to invoke or start the sshd deamon on a remote system from loal system ..??

i do not have rsh or rlogin commands ?

is it possible with any othere tools in linux..

because every time i have to go to remote system start the sshd because they stoped the process after booting??

can i start the stoped sshd on remote system?

help me..
 
Old 04-20-2005, 05:51 AM   #2
Artanicus
Member
 
Registered: Jan 2005
Location: Finland
Distribution: Ubuntu, Debian, Gentoo, Slackware
Posts: 827

Rep: Reputation: 31
if you dont have rlogin (and the remote host wouldnt most likely allow access with those anyways) you could allways install them? Atleast in Slackware it comes with the tcpip package.

If thats not an option, then your last few hopes are:

1. telnet. Its most likely off or blocked, but worth a try
2. root ftp / nfs - This is a sneaky trick, if you can get access to the partitions somehow (ftp or nfs or similar filetransfer protocols) and sneak a script (shellscript that starts the sshd) into the hourly cron directory, sshd will start on the next cron hourly.. Well, asuming the remote host has crond running ofcourse..

I cant think of anymore computer related answers, but calling someone at the machine is prolly the easiest way.. And when you do get access, put the sshd into rc.local to start it automagickly.. save ye alot of hassle.. (:

Last edited by Artanicus; 04-20-2005 at 05:53 AM.
 
Old 04-20-2005, 06:01 AM   #3
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
Having another remote connection protocol, like telnet or rsh, kinda defeats the purpose of using ssh in the first place. It would be easier, and safer, to get ssh to start on boot than to get one remote connection protocol running just so you can use that to start another remote connection protocol like ssh.

What I would do is find what distribution is running on the remote system and then find out what method is used to make that distro start ssh automatically.
 
Old 04-20-2005, 10:04 AM   #4
bruse
Member
 
Registered: Feb 2005
Location: internet
Distribution: Debian
Posts: 821

Original Poster
Rep: Reputation: 30
correct cron is a method but i think we should wait until the program get started..

and we should know the exact time settings of the system?

if the hardware clock is tuned for different time zone what we will do?

how can we get the time of remote box?
 
Old 04-20-2005, 11:02 AM   #5
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
If I understand it right, the remote system gets rebooted and sshd isn't starting on boot. If that's the case then you need to turn on the startup script for sshd. You could set up a cron job to start the service, but you only have to do that if it's getting shut off some other way besides a reboot, such as being manually disabled or crashing. If all you need to do is make sure sshd is starting on boot, then it should be a simple command like chkconfig sshd 3 5 (that may not be the exact syntax, check the man page for your distribution.)
 
Old 04-22-2005, 05:26 AM   #6
Artanicus
Member
 
Registered: Jan 2005
Location: Finland
Distribution: Ubuntu, Debian, Gentoo, Slackware
Posts: 827

Rep: Reputation: 31
indeed the first priority would be starting in on boot. I just asumed the situation was that you have no physical access to the machine. In that case, the cron method is nice IF you have access to the partitions some way eventhough you dont have ssh. I had a situation where my server threw a total tantrum, disabling every local tty and killing sshd. I still had the root partition nfs mounted on a different machine, so I could sneak in a cron task to /etc/cron.hourly/sshd.sh with the script as:
Code:
#!/bin/bash
/usr/sbin/sshd
The "hourly" crons are run every hour, so I just had to wait 30 mins for that to come up, and voila, sshd was back online. The directory structure is Slackware specific, but other distros have similar systems. One cannot sneak in a normal crontab entry as they are stored in a temorary file that is created when you execute crontab -e. Thus, it is imo impossible to remotely without a shell, make a normal crontab entry. Thus, you have no need to know what the local time there is, only when the next hourly crontab will be run.

But, thats just a quickfix. Enabling the init script for it is the permanent way to go. If your distribution uses the BSD style init:
Code:
chmod +x /etc/rc.d/rc.sshd
If youre on a SysV init style distro, I cannot advise you, but most distros are SysV, so someone will surely be able to help you with that.

Well, that became quite a long post for a simple matter, hmh, well, back to my morning tea.. d:
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
freebsd halt at Starting sshd blackzone *BSD 3 01-31-2005 06:22 PM
sshd starting twice ryedunn Linux - Software 4 01-30-2005 10:47 PM
sshd not starting up on boot after upgrade babis Linux - Software 1 03-18-2004 08:04 PM
Starting sshd: [ OK ] pk21 Linux - General 4 03-05-2003 05:27 PM
starting sshd on SuSE 7.0 glock19 Linux - General 2 05-02-2002 04:21 PM


All times are GMT -5. The time now is 04:39 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration