how restart SSH server

Anything regarding SSL/SSH and other security questions may go here

Moderators: Synology Inc, Honorary Moderator

Forum rules
Please note the disclaimer before modifying your Synology Product.

how restart SSH server

Postby mischaq » Thu Apr 03, 2008 8:53 pm

hi modders

how can i restart DS's ssh server without complete reboot of the DS, so that the ssh-server adapts to a changed sshd_config-file?

thanks!
mischaq
mischaq
Versed
Versed
 
Posts: 276
Joined: Mon Jul 16, 2007 7:37 pm

Re: how restart SSH server

Postby Svuppe » Thu Apr 03, 2008 9:50 pm

I use these two commands:

killall sshd
/usr/syno/etc.defaults/rc.d/S95sshd.sh start
Svuppe
Student
Student
 
Posts: 65
Joined: Tue Jan 16, 2007 11:17 pm

Re: how restart SSH server

Postby mischaq » Thu Apr 03, 2008 10:57 pm

is there a difference between them?
which one should i use (i guess i just enter them in a "Diskstation>"-Prompt...also when logged in via ssh?)

..many thanks
mischaq
Versed
Versed
 
Posts: 276
Joined: Mon Jul 16, 2007 7:37 pm

Re: how restart SSH server

Postby Svuppe » Fri Apr 04, 2008 7:15 am

Yes, there certainly is a difference. The first one stops the ssh server, and the second starts it again.
And I don't recommend doing it while logged in via ssh. As soon as you type the first command, the ssh server is shut down, and then you are disconnected. Do this using telnet instead.
Svuppe
Student
Student
 
Posts: 65
Joined: Tue Jan 16, 2007 11:17 pm

Re: how restart SSH server

Postby mischaq » Fri Apr 04, 2008 10:36 am

ok - thanks...sorry for my noobness :D
mischaq
Versed
Versed
 
Posts: 276
Joined: Mon Jul 16, 2007 7:37 pm

Re: how restart SSH server

Postby mischaq » Fri Apr 04, 2008 10:39 am

what about "/etc/init.d/sshd restart"

...found this searching the froum for restart sshd

cheers, mischaq
mischaq
Versed
Versed
 
Posts: 276
Joined: Mon Jul 16, 2007 7:37 pm

Re: how restart SSH server

Postby Svuppe » Fri Apr 04, 2008 4:21 pm

The directory "init.d" doesn't even exist, so that won't work at all.
At least I don't have it on my 107+ with the newest firmware.
Svuppe
Student
Student
 
Posts: 65
Joined: Tue Jan 16, 2007 11:17 pm

Re: how restart SSH server

Postby Ben » Sun Jul 13, 2008 9:56 pm

I use the following:
Code: Select all
cd /usr/syno/etc.defaults/rc.d/
./S95sshd.sh restart &


You will loose your SSH session, but at least with the '&' sign, the script will run in the background and the daemon will restart. Easier than going via a Telnet session, though you could want to have one just in case you messed you sshd config... :-)
Ben
I'm New!
I'm New!
 
Posts: 6
Joined: Fri Jun 13, 2008 6:31 pm


Return to Security/Secured Mods

Who is online

Users browsing this forum: No registered users and 2 guests