29th May 2008, 09:28 am
I run a backup script to backup my VPS’s every night using rsync. On one of my VPS’s I was seeing the error “ssh: connect to host … port 22: Connection refused” at seeming random points.
It took me a while to track down the fact that lylix.com (the provider of my VPS) block multiple inbound and outbound ssh connections to a server made over a short period of time.
Whilst this is probably useful for some people, and will offer their VPS some protection from brute force login attempts, it broke my script!
Continue reading ‘ssh: connect to host … port 22: Connection refused’ »
19th May 2008, 01:41 pm
Even with today massive disk drives it’s so easy to run out of disk space. This can be a real pain if you happen to run out of space on your root volume.
So, you fancy doing some spring cleaning and want to track down where all of your space has gone.
Here’s a quick run through using nothing more than the command prompt -
To show all of your filesystems with the -m showing used/free space in megabytes
$ df -m
Filesystem 1M-blocks Used Available Use% Mounted on
simfs 10000 718 9283 8% /
So I’m using 718 MB of my disk space but where?
For the next bit we’re going to need to be root (or root equivalent)
$ sudo -s
# cd /
# du -ahm --max-depth 1 --exclude /proc | sort -n
That will list the size in MB of all of the folders in root (/) with the largest last.
5 ./bin
6 ./etc
6 ./root
7 ./sbin
12 ./lib
18 ./home
154 ./var
513 ./usr
So my /usr folder is using 513MB. Now I can drill down into the folders running the same command again.
# cd /usr
# du -ahm --max-depth 1 --exclude /proc | sort -n
and so on.
Obviously you only want to be deleting files when you’re absolutely positive what they are used for and what impact deleting them will have on your system!
There are a whole bunch of utilities for both Windows and linux to make this process easier and prettier! Here’s a couple -
Linux – http://treesize.sourceforge.net/
Windows – http://sourceforge.net/projects/windirstat/
16th May 2008, 10:37 am
I’ve always been pretty confident just using denyhosts to prevent people running brute force ssh login attempts against my servers but now with this from securityfocus – http://www.securityfocus.com/news/11518 – I think I’ll also be changing the port number that SSH is listening on.
The report says that there are now large distributed brute force ssh attempts coming from multiple IP addresses. This means that utilities that are blocking login attempts from hosts that have made multiple failed attempts are not going to help.
15th May 2008, 12:37 pm
I was trying to install Solaris U5 on one of our Sun boxes using jumpstart today and came across the error –
ERROR: Could not open file (/a/etc/vfstab)
We were previously using Solaris U4 and I had copied the U5 media to our jumpstart server. What I had forgotten to do was to copy the x86.miniroot file from the installation media to where it was being loaded from.
This resulted in the U5 installation trying to use the U4 ramdisk image. Doh!
So, if you see the same error, it’s something to check.