LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices



Reply
 
Search this Thread
Old 12-29-2005, 02:19 PM   #1
Truffles
LQ Newbie
 
Registered: Dec 2005
Location: North Carolina
Distribution: suse 9.3
Posts: 2

Rep: Reputation: 0
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
 
Old 12-29-2005, 07:40 PM   #2
wdingus
Member
 
Registered: Aug 2001
Location: Kingsport, TN
Distribution: RHEL & FC
Posts: 267

Rep: Reputation: 30
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.
 
Old 12-30-2005, 03:53 PM   #3
Truffles
LQ Newbie
 
Registered: Dec 2005
Location: North Carolina
Distribution: suse 9.3
Posts: 2

Original Poster
Rep: Reputation: 0
I am using suse 9.3 and ssh 3.8p1

Some how I would like to edit xinetd to start this other server also
 
Old 01-05-2006, 10:30 AM   #4
celejar
Member
 
Registered: Oct 2003
Location: New York
Distribution: Debian Sid
Posts: 185

Rep: Reputation: 30
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.
 
  


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
Problem setup SSH tunnel over multiple servers dussel Linux - Networking 5 07-29-2005 09:51 AM
Cannot SSH OUT FROM MY OFFICE SERVERS. ayie Linux - Newbie 9 10-20-2004 10:33 PM
Linking to multiple linux servers with SSH rwalkerphl Linux - Newbie 2 07-05-2004 01:37 PM
Use SSH to connect MS SQL Servers jweag Linux - Networking 2 11-12-2003 10:13 PM
SSH Tunneling and Comcast Mail Servers littis Linux - Networking 7 10-17-2003 11:21 PM


All times are GMT -5. The time now is 12:21 AM.

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