Tuesday, October 16, 2007

P3 733MHz Server and SSH

I badly need a multi-purpose server to hone my skills and host my site and my files. So I converted my old P3 733MHz into a server. Good thing it only consumes 19.1 Watts, that'll help a lot with my Power bill. After I installed Ubuntu Gutsy RC1, I disabled everything else... CD-ROM Drive, USB, etc. etc. etc. The only thing running right now is the CPU, PSU, and my trusty old 20GB Hard Disk Drive.

After two days of configuring it, I finally got my server running. Had to wait for my DNS entry to propagate though, but it worked well once I got it up and running. So far, it's been running for 3 days straight, and it's as fast and cool as ever. I might need to take it offline next year though to clean the dust.

And lastly, I need to have it running headless. So I installed OpenSSH-server, imported my key to the authorized_keys file and configured it to only accept logins from me. However, before getting it to work flawlessly, I encountered one problem... it won't allow me to login. I keep on getting Permission denied error.

How did I know I have a permission problem? I checked /var/log/auth.log and saw this line:

Oct 16 16:38:25 t2798 sshd[29599]: Authentication refused: bad ownership or modes for directory /home/dax/.ssh

Since I imported my /home from an old HDD, I forgot to check it's permission. SSH is very particular about permissions. I fixed it by issuing this command:

server$ chmod go-w ~/
server$ chmod 700 ~/.ssh
server$ chmod 600 ~/.ssh/authorized_keys





Blogged with Flock