SSH and Limits

January 18th, 2011 No comments

I was tasked to look at why a limit wasn’t being applied to a shell when using ssh. To let you understand lets have a look at what was being seen:

[user@host]$ ssh test -l user
user@test's password:
[user@test]$ ulimit -n
1024
[user@test]$ cat /etc/security/limits.conf
* soft nofile 4096
* hard nofile 4096

However switching to the same user you will see:

[user@test]$ su - user
Password:
[user@test]$ ulimit -n
4096

That the limit isn’t respect when logging in via SSH but when we switch user it is applied.

The reason for this is rather simple; the SSH is opening a shell that isn’t a login shell and therefore limits is not being applied. To correct this simply edit your sshd_config file and set it to use login shells.

[root@test]$ grep -i uselogin /etc/ssh/sshd_config
#UseLogin no

You can see that the entry is set by default to no; so simply edit the line and alter it to yes:

[root@test]$ sed -i.bak 's/#UseLogin no/UseLogin yes/' /etc/ssh/sshd_config
[root@test]$ grep -i uselogin /etc/ssh/sshd_config
UseLogin yes

Now reload your sshd.

[root@test]$ /etc/init.d/sshd reload
 /etc/init.d/sshd reload
Reloading sshd:                                            [  OK  ]

And test again:

[user@host]$ ssh test -l user
user@test's password:
[user@test]$ ulimit -n
4096

That’s it! Sometimes odd behaviour like this can be difficult to track down without having a good read of configuration files.

Tags: , , ,

Dropbox, Fedora14 and SELinux

November 17th, 2010 No comments

I just recently updated to Fedora 14 and came across an issue that many others have. Fortunately enough OpenSourceGeek provided me with an instant solution happy syncing :) !

Create GMail Mailing List Filter

October 26th, 2010 No comments

One of my friends was having trouble filtering a mailing list today with GMail. Turns out he didn’t know that GMail makes it simple:

  • Open on of the mailing list e-mail
  • Expand the “Show Details” link.
  • Click on the “Filter messages from this mailing list” link

That’s it instant filter, then you setup the label you wish and the actions. Just one more reason why I really love using GMail!

Tags: ,

Make Router Respond To Ping

October 23rd, 2010 No comments

I have a old “BT Voyager 2100″ router and wanted to enable ping. It turned out that the setting was in a bit of an unusual place (at least I thought so).

Open the router web interface, normally http://192.168.1.1/
Advanced > System > Remote Access

Then tick the “Ping” checkbox and apply.

After this the box will respond to ping.

Tags: ,

GCD Contributors Make 300,000 Comic Book Covers Available Online

October 19th, 2010 No comments

October 18, 2010 — The Grand Comics Database today announced that it has posted its 300,000th comic book cover scan.

The 300,000th cover posted to the site was Captain America #248, published by Marvel Comics in 1980, with a cover pencilled by John Byrne and inked by Joe Rubinstein.

The cover scan was uploaded by Ramon Schenk of the Netherlands, a regular contributor to the GCD.

The Grand Comics Database (GCD) is the Earth’s largest repository of indexed comic book information. In addition to its 300,000 covers, the GCD has, to date, recorded more than 600,000 individual comic books and indexed more than 140,000. More than 5,000 publishers from around the world are represented in the GCD.

The GCD is a nonprofit project of international volunteers, with the goal of documenting and indexing all printed comics for the free use of scholars, historians, researchers, and fans worldwide.

The GCD is open to all and anyone can contribute information to the project.

For further information, go to www.comics.org.

(Mike Catron is a volunteer with the GCD and is the author of this press release. To contact a board member of the Grand Comics Database, email to gcd-contact@googlegroups.com)

Tags: ,

Switch to our mobile site