Re: different ssh settings for different users

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hi Ankush,

I believe you can do this by running a different sshd for each unique
port (using ListenAddress, Port) that you wish to allow ssh connections
to, then use the "AllowUsers" configuration property for each respective
sshd to limit the logins on each port to given users. You will need to
modify or duplicate the sshd service script to cater for this, and have
multiple sshd_config files, one for each unique port.

>
hey Mr. Ben,


I tried to do the same as you told me. I created another service sshd1
under /etc/init.d
I changed some settings for sshd1 service like
CONFIG_FILE=/etc/ssh/sshd_config1
PID_FILE=/var/run/sshd1.pid
SSHD=/usr/sbin/sshd1
[ -f /etc/sysconfig/sshd1 ] && . /etc/sysconfig/sshd1
/var/lock/subsys/sshd1

the settings in  /etc/ssh/sshd_config1 file

Port 3455
Listen Address 192.168.1.45
PermitRootLogin no
AllowUsers  raju

the settings under /etc/ssh/sshd_config are default except I change
the listen address to 192.168.1.45 and disabled the connection for
IP6.

I restarted the sshd & sshd1 service but I am got the below error and
I am not able to ssh on the port 3455 whereas on port 22 I can ssh. I
have also copied /usr/sbin/sshd to /usr/sbin/sshd1 and had also added
this in the /etc/init.d/sshd1 file

sshd1[4238]: error: Bind to port 22 on 192.168.1.45 failed: Address
already in use.
May 31 17:32:17 cluster1 sshd1[4238]: fatal: Cannot bind any address.

sshd1 is listenting on port 3455 not on 22.

I have also added this line in /etc/modprobe.conf to disable ip6

alias net-pf-10 off

How to get rid of this problem ?

Thanks & Regards

Ankush Grover

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux