General :: Restrict The Number Of Ssh Connections To Box - By Username Or By Ip Or Both?
Jan 27, 2010Can I restrict the number of ssh connections to my Linux box - by username or by ip or both?
View 3 RepliesCan I restrict the number of ssh connections to my Linux box - by username or by ip or both?
View 3 RepliesCan I restrict the number of ssh connections to my Linux box - by username or by ip or both?
View 1 Replies View Relatedif i want user should`t have more than 20 sftp connections to a server,is there any way we can limit no.of connections to a particular user on the server using ssh configuration
View 7 Replies View RelatedI set up SSH on a server running Ubuntu using rsa key authentication. I want to allow a friend of mine to log into the server with restricted access, so I created a user account named "guest" with its own home directory and ensured that it has no root access. I created a new pair of keys and added the public key to my authorized_keys, but when I was testing SSH I noticed that not only could I not log in as guest, I could use the key to log in as my own account and gain root access via sudo. How can I restrict specific private keys to only be able to log in as certain users?
View 6 Replies View RelatedOn my RHES4 I noticed a load of files which had owner set as the owners uid rather than the actual username - is this usual behaviour ? On a similar system the same files actually have the username as the owner.It's just causing me issues as I have changed the users ID and now some thing's wont start meaning I have to manually do a find and chown on the system.
View 4 Replies View RelatedHow do I find the maximum number of concurrent connections (in any state)? I'm running RHEL5 2.6.18-194.26.1.el5. Also, does tcp auto tune affect the number of concurrent connections or is it mostly used for dynamic buffer size allocation?
View 3 Replies View RelatedDist: Fedora 14
SSHD: OpenSSH 5.5p1
I need to limit the number of ssh connections a user has. All the users are using tunnel only so their shell is set to /sbin/nologin The logins do not open a shell they just create the tunnel so /etc/security/limits.conf has no effect on them at all.
I tried setting 'MaxSessions 1' in sshd_config but either that doesn't not do what I expect it to or it plain does not work as even with a normal user I was able to open an unlimited number of sessions. I need a good secure way to limit each user to 1 ssh session without them having a shell but Im unable to find a solution.
I have Ubuntu 9.04 and I would like to know what is the command to find out the number of connections per user (i.e. ssh) and also what syslog module do I need to modify and how to enable it in order to have it logged, thing is I need to generate this event in order to see it in RSA enVision, I've tried with "who" but nothing is displayed, do I need to program something besides that? or what can I do? to have no. of connections and have that logged so I can see the event in enVision.
View 3 Replies View Relatedi've got a select based application that wants to support a large number of mostly idle connections. the code is java and works on windows, suse enterprise linux, mac os x. it does not work on centos 5.5 (32-bit, 2.6.18 kernel, 1G of memory).
i've read and followed the directions in various articles about tuning linux for large numbers of connections (including the C10K problem), and gotten the number of sockets up to 3200.
these didn't make any apparent difference:
[URL]
on windows, i can get up to around 78,000.
on suse enterprise linux (a few years ago), i got up to 90,000. that's where i got bored and stopped.
on my mac laptop with os x (snow leopard), i got up to 10,500.
i have used ulimit -n 10240
my current goal is 10k sockets.
the test is that i'm opening one socket at a time until it fails. when it fails, many of the sockets which have already been opened also fail, in one giant cascade. sounds like a buffer / memory problem.
each group of 64 sockets gets a thread to manage select calls for them. thus i'm only using around 61 threads total when it fails.
How to number of connections for a single ip on port 80 to CentOS 5.5 with iptables? connlimit did not work on CentOS and nginx does not provide a module for that
View 4 Replies View Relatedexcept is there is a way to enhance mod_limitipconn.c to ensure that apart from restricting one connection allowed from a given IP, also set so that an IP can only connect on every set interval ?e.g.restrict the number of connections from a given source IP to say once every 5 minutes or so?if not mod_limitipconn.c, any other mechanism to do the expected result?
View 2 Replies View Relatedhave a problem with my network-manager in ubuntu 10.10.when I dial one of my vpn connections, my other vpn connections be disabled and I can't use them!I tried to restart network-manager and gnome-panel, but it does't seem to solve this problem.
View 1 Replies View RelatedWhy does unix ps -l whows one number in column "PRI" but in same time ps -o pri shows another number? cpu and nice are zero for those processes
View 1 Replies View RelatedIs it fair to say that connLimit and hashlimit are very similiar on Linux i.e. while hashlimit caters to limits for groups of ports, they both set the connection rate limit per host? How in IPTables, do I configure a policy that limits connections on a port that encapsulates the total sum of all connections from all hosts? i.e. I do not want to allow more than 6000conn/minute for port range that is the sum of all connecting hosts?
View 3 Replies View RelatedSuppose that some person is insomniac because of a bad habit of chatting on the IRC every night until 3AM. That completely ruins this person's life because he is unable to wake up on time to attend his exams, because he will be fully exhausted everyday and will feel depressive.
That person is conscious of this bad behaviour, and would accept any help including installing a software on his own computer granting me admin privileges to install it.
Do you know of such a software that ideally would: Would prevent use of the computer at certain time ranges, let's say 11PM — 6AM Would gracefully shutdown the computer at the beginning of that time range (not killing all the applications brutally), and shutdown it if the user attempts to switch it back on Would warn 10 minutes beforehand Could occasionally be disabled if I give a one-time password to that person?
That person uses Linux, and I am curious of knowing what is available for that purpose. It is kind of a parental control, but not for a child.
I recently installed Fedora 15 now, and during installation I set the internet connection manually, then did update and after reboot, the internet connection settings have been removed. Now I can not set because the network connection to the Internet Connection is inactive. I mention that before the update was functional internet connection.
View 5 Replies View RelatedUnder Linux, I would like to be able to launch anything from command line in a "safe" environment, i.e. be assured that it can't read or write any file on my computer, and even better if it couldn't access the network.I thought about creating a user with reading rights only in the current folder (and nowhere else), and su to this user to launch the command, would this work ? And what about the network ?
View 2 Replies View RelatedI just wondering if scp working with restrict bash ? It seems like my scp just stuck there while login.
If i use ftp i get 530 login failed..
As example, I have directory in /root called as "shared". i already shared this directory using NFS. i want to limit this directory size into 20 GB(20*1024*1024).That means "shared" directory reserved 20 GB disk space from the HDD.how can i solve this problem
View 3 Replies View Related1-Can I do su - userA in php? Cam I have php run the whole script as userA.
2-Can I make php to run from a certain directory? like chroot kind of things.
I use Rh server , can advise if I want to restrict the root user can not directly login to the system ( eg. ssh -l root IP_address" , what can i do ?
View 5 Replies View RelatedI have written a simple server application (with an HTTP interface). I want to ensure that only calls from the local machine are processed - i.e. I want to prevent outsiders from accessing/using my server.
How may I restrict outsiders (i.e. requests from remote machines)?
During set-up of a home server (running Kubuntu 10.04), I created an admin user for performing administrative tasks that may require an unmounted home. This user has a home directory on the root partition of the box. The machine has an internet-facing SSH server, and I have restricted the set of users that can connect via SSH, but I would like to restrict it further by making admin only accessible from my laptop (or perhaps only from the local 192.168.1.0/24 range). I currently have only an
[Code]....
I'm in the process of restricting access to my Linux production box, where ssh access needs to be limited to only a few MAC addresses.I've followed the instructions outlined in this guide and ran the following two commands:
/sbin/iptables -A INPUT -m mac --mac-source XX:XX:XX:XX:XX:XX -j DROP
/sbin/iptables -A INPUT -p tcp --destination-port 22 -m mac --mac-source XX:XX:XX:XX:XX:XX -j ACCEPT
root@xxxx:~/#: iptables --list
[code]....
NSA's Guide to the Secure Configuration of Red Hat Enterprise Linux 5 recommands restricting device ownership to root only.
So my question is why should we restrict device ownership to root? And what does device ownership mean anyway in Linux?
I use 'grep -Ri "mypattern" .' to search for all files in the current directory recursively that contain "mypattern". But this command returns every single occurence, so that if a given file has several occurences of the pattern, the screen fills up pretty quick. More than likely, there's a way to restrict the output so that it only displays each file once, no matter how many occurences it contains, but I couldn't find how to do it.
View 2 Replies View Relatedhow can i restrict a single particular user from logging into the server not more than 5 times?
The conditions may be:
1) wrong password
2) can login only 5 times on one day etc.
Is there way we can restrict root to su to normal user. Or at least a way to prompt for the password when root tries to su <username>.
View 3 Replies View RelatedHow to restrict users to send mail to outside domains in qmail server, i have centos and qmail installed
View 14 Replies View RelatedI want to limit delete of a particular folder in the user's home folder and to restrict any add/change/delete on files in that restricted directory.
/home/myuser
/home/myuser/_protected //no delete
/home/myuser/_protected/1.txt //only read
How can I do that on Ubuntu server?