LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   starting sshd how to.. (https://www.linuxquestions.org/questions/linux-networking-3/starting-sshd-how-to-315196/)

bruse 04-20-2005 03:28 AM

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..

Artanicus 04-20-2005 04:51 AM

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.. (:

Darin 04-20-2005 05:01 AM

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.

bruse 04-20-2005 09:04 AM

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?

Darin 04-20-2005 10:02 AM

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.)

Artanicus 04-22-2005 04:26 AM

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:


All times are GMT -5. The time now is 08:26 PM.