LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   creating 2 ssh servers on 1 computer (https://www.linuxquestions.org/questions/linux-security-4/creating-2-ssh-servers-on-1-computer-397636/)

Truffles 12-29-2005 01:19 PM

creating 2 ssh servers on 1 computer
 
ok
I can ssh to a computer fine through port 22 I think it is. All is good, but sometimes the ssh server on a remote computer goes down or gets hung. So I could always reboot or restart the ssh. If the computer I am trying to access is far away, there is no way for me to access the computer, but to physically go to that computer.

What I would like to know is-

Is there a way to create another ssh server on the same computer through a different port. That way if one server goes down I can access the computer through the other port and server and restart the other server.

Maybe their is a script or something you could have running on the computer instead of having 2 ssh servers?

I am very new and any help is most appreciated.
Thanks

wdingus 12-29-2005 06:40 PM

Have a look at the man pages for sshd and notice this:

-f configuration_file
Specifies the name of the configuration file. The default is /etc/ssh/sshd_config. sshd refuses to start
if there is no configuration file.


A copy of /etc/ssh/sshd_config could be made with only a change of the "Port 22" section referencing a different port. Then start up a second copy of sshd giving this config file to it. Possibly /etc/rc.local would be a good place to put this to cause it to start at each system boot. "/usr/sbin/sshd -f /etc/ssh/sshd_config_2" or similar.

Now then, what version and what distro? I use SSH a *lot* to admin a *lot* of servers and for me it's quite probably the most reliable bit of code on the boxes.

Truffles 12-30-2005 02:53 PM

I am using suse 9.3 and ssh 3.8p1

Some how I would like to edit xinetd to start this other server also

celejar 01-05-2006 09:30 AM

Quote:

Originally Posted by Truffles
ok
I can ssh to a computer fine through port 22 I think it is. All is good, but sometimes the ssh server on a remote computer goes down or gets hung. So I could always reboot or restart the ssh. If the computer I am trying to access is far away, there is no way for me to access the computer, but to physically go to that computer.

What I would like to know is-

Is there a way to create another ssh server on the same computer through a different port. That way if one server goes down I can access the computer through the other port and server and restart the other server.

Maybe their is a script or something you could have running on the computer instead of having 2 ssh servers?

I am very new and any help is most appreciated.
Thanks


Check out this article about daemon monitoring daemons for sshd - the author is discussing a different solution for a problem quite similar to yours.


All times are GMT -5. The time now is 08:30 AM.