LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 05-17-2011, 10:15 AM   #1
chesschi
Member
 
Registered: May 2011
Posts: 41

Rep: Reputation: 0
multiple sshd on different ports


Hi all,

I am completely new to sshd and would to know how to separate sftp and ssh and run on different ports.

i.e.
a) sftp on port x
b) ssh on port 22

I searched from the web and there are no detailed instructions. They suggested something like separating sshd_config into two files (file A and file B) and run two instances. Each instance points to its configuration file.

However, they didnt write down the detailed procedure of
a) how to modify file A and file B (i.e. which line should insert specific commands)?
b) how to run two instances?
c) how to point each instance to its config file.

I am using Linux CentOS and the latest open-ssh.

Thanks a lot for your help!!!

Last edited by chesschi; 05-17-2011 at 10:39 AM.
 
Old 05-17-2011, 10:23 AM   #2
troop
Member
 
Registered: Feb 2010
Distribution: gentoo, arch, fedora, freebsd
Posts: 379

Rep: Reputation: 96
Quote:
a) how to modify file A and file B (i.e. which line should insert specific commands)?
change Port and add ChrootDirectory (http://www.debian-administration.org/articles/590 for example)
Quote:
b) how to run two instances?
distro specific. You can just type sshd [args]
Quote:
c) how to point each instance to its config file.
argument -f config_file. sshd -f /etc/ssh/fsftp_config for example
 
1 members found this post helpful.
Old 05-17-2011, 10:30 AM   #3
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora, Lubuntu, FreeBSD
Posts: 3,930
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by chesschi
I am completely new to sshd and would to know how to separate sftp and ssh and run on different ports.
The answer may be different depending on your Linux distro and version (and, more significantly, your OpenSSH version). Please remember to include that info in your first post.

For a RHEL example, read here:
http://www.linuxquestions.org/questi...on-rhel5-3495/
 
1 members found this post helpful.
Old 05-17-2011, 10:53 AM   #4
chesschi
Member
 
Registered: May 2011
Posts: 41

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by troop View Post
distro specific. You can just type sshd [args]
I am using CentOS. What should I do to run multiple instance?

Also, will they share the same processor id?

Last edited by chesschi; 05-17-2011 at 11:05 AM.
 
Old 05-18-2011, 03:48 AM   #5
chesschi
Member
 
Registered: May 2011
Posts: 41

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by chesschi View Post
I am using CentOS. What should I do to run multiple instance?

Also, will they share the same processor id?
I also need to setup two account using AllowGroups and DenyGroups to allow one type of user to access sftp only and another user to access ssh only. I am really confused about the proper procedure start from scratch. Could someone tell me the step-by-step procedures including running multiple instances on different port and the use of AllowGroups and DenyGroups?

I am sorry about the stupid questions but I am really confused.

Thanks a lot!!!
 
  


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
Multiple minicom sessions w/multiple serial ports?? phody_lee Linux - Server 1 11-15-2010 11:17 AM
Starting sshd: /etc/init.d/sshd: line 113: /usr/sbin/sshd: Permission denied sumanc Linux - Server 5 03-28-2008 04:59 AM
single ip with multiple ports .....possible?? kool_kid Linux - Networking 5 11-19-2007 09:56 AM
multiple ports being opened to internet keratos Mandriva 4 06-25-2007 06:27 AM
iptables - using ! to allow multiple ports chibi Linux - Security 23 07-04-2006 03:42 AM


All times are GMT -5. The time now is 03:35 AM.

Main Menu
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