Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is this above mentioned in title possible ? I want to run one SSH server for SFTP clients (on some other port.. for ex 2121 ), and want to run other SSH server for SSH clients which will be allowed to log in only with key. Anyone have Idea how to implement this ?

tnx

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

Use separate config files and start one of the servers specifying the config file.

share|improve this answer
    
And how can I do this ? –  amarc Jul 4 '10 at 16:30
1  
See sshd(8) and read about the parameter -f: openbsd.org/cgi-bin/man.cgi?query=sshd&sektion=8 –  joschi Jul 4 '10 at 16:35
    
You will most likely also want a separate set of init scripts, pid files, etc. Exactly how do accomplish that depends on what linux distribution you are running. Yet, different config files are the core in the solution. –  andol Jul 4 '10 at 16:43
    
Well I run Debian Lenny.. I just did /usr/sbin/sshd -f /etc/ssh/sshd_config2 and that did start ssh on diferent port. It would be nice to have init script tho. Anything I could change quickly in original /etc/init.d/ssh to acomplish this ? tnx –  amarc Jul 4 '10 at 16:45
add comment

Alternatively to the solution posted by BillThor (using two seperate configuration files) you might want to check the Match directive in sshd_config(5) which can be used apply different configurations per user/group/client IP address.

share|improve this answer
    
While this technically isn't what you are asking for, it does seem like the most natural solution to the problem I am guessing you are trying to solve. –  andol Jul 4 '10 at 16:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.