Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple SSH settings 1

Status
Not open for further replies.

IPGuru

Vendor
Jun 24, 2003
8,391
GB
I currently have SSHD setup to accept RSH connections only

I would like to ammend this so that password authentication is allowed from my internal network but keeping it set to RSH only from the internet which is connected via an external router.

I intend changing the port used for connection from the internet but would be quite happy for internal connections to remain on 22 if necessary.

Can anyone advise what changes need to be made to my sshd_config file
 
I presume by "RSH connections only" you mean that you only accept key-based authentication? Or .slogin files perhaps? RSH is actually a completely different protocol to SSH.

The simplest thing would be to make a copy of sshd_config and run another sshd -f /path/to/second/ssdh-config. Then I guess you just need to specify the correct Port n option for each of your daemons, and comment out the PasswordAuthentication no option for the one that should accept passwords.

Annihilannic.
 
that certainly sounds like a solution but I was hoping to only need one ssh daemon running
 
I don't believe that's possible. As far as I know you can't say "listen on this port and use these configuration options, and listen on this other port but use these different configuration options".

Unlike in your ssh_config where you can, for example, have different configurations based on the host you are connecting to, etc.

Annihilannic.
 
Ok, 2 * sshd it is then

1 lsat Q. How do I start a 2nd sshd automaticaly (using red hat based sys ) /etc/init.d/sshd start/stop only works for the current sshd

would copying & modifying the script to sshd2 work?
 
Decided to adopt Universal Plan B instead

Created new config file sshd2_config, & added the following to /etc/rc.r/rc.local

/usr/sbin/sshd -f /etc/ssh/sshd2_config

all working as req. many thanks

---------------------------------------------------------
Universal Plan B - When all else fails CHEAT!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top