Setting up an sftp & ssh server

January 9th, 2012

First things first you should do the following:

sudo apt-get install openssh-server ssh

This will install the server and the ssh daemon, you can start the server by doing:

service ssh start

You also have the following at your disposal(don’t forget to sudo if you aren’t running as root):

service ssh restart #restarts the server

service ssh reload #reloads the configuration file for the server

service ssh stop     #stops the server

service ssh status  #gives you a short description of the status of the server

Now that you have some knowledge of how to start, restart, and stop the server we are going to take a look at configuration.

sudo vim /etc/ssh/sshd_config #or nano if your lazy or whatever you normally use gedit is perfectly valid here

The first thing you’ll want to do is set it up to bind to an address (NOTE: The default is to listen on all address’s so if you have your computer in dmz(w/e its called) where your internet ip is assigned to your computer you may want to change this).

So navigate to where it says ListenAddress this tells the server what ip to listen on, your going to want to change this to 127.0.0.1 (which is the loopback address ie it means it will run locally).

The default for this server is to allow ssh scp and sftp connections, you are pretty much done if you don’t mind having those options available for me I wanted to have an sftp only server so I’ll show you guys how in case you wanted to know,

Go to the very last line of your sshd_config(again as earlier mentioned its in /etc/ssh/)

Add this to the bottom:

Match Group sftponly
ChrootDirectory /home/%u
AllowTCPForwarding no
X11Forwarding no
ForceCommand internal-sftp

Then do:

sudo groupadd sftponly

Now we need to add a user to the sftponly group

sudo adduser sftpguy

sudo usermod -g sftponly sftpguy

Next we want to chown  /home/ to root

sudo chown root:root /home/

sudo mkdir /home/sftpguy #if it doesn’t exist

sudo chown sftpguy:sftponly /home/sftpguy

You should be done with your sftp server now and can now do:

sudo service ssh start

Hope this helps someone who wants to know this information :P

– acidfrost

Categories: Tutorials

Tags: , , No Comments

Ubuntu is Still a Good Distro

August 5th, 2011

Lately, with the release of  Ubuntu 11.04, the implementation of Unity as the default interface, and some apparent differences of opinion with GNOME, Ubuntu has received some heavy criticism. Some of  this is well justified. Unity is certainly a work in progress, but it will improve. The differences with GNOME actually could be a good thing, because that’s what Open Source is all about, choices, and that gives us the user more choices. With these changes one thing still remains: Ubuntu is still an excellent Linux Distribution.

I took to the streets screaming the sky is falling after using 11.04. To be completely blunt I do not like Unity. I do, however, really like GNOME 3 / Shell. I feel GNOME 3 has a polish and a finish that Unity does not yet have. I have taken inventory over the last few weeks, I remember trying GNOME 3 in its earlier unreleased state and I didn’t like it either. Unity was released in Ubuntu 11.04 a non LTS (Long Term Support) release. That gives the developers plenty of time to get things really good before 12.04 appears. I believe that Unity will be very good by then. The LTS releases have never disappointed me. I began using Ubuntu with 7.10 I then moved to 8.04 which I believe to be one of the best OS releases ever. Ubuntu 10.04 was also rock solid and stable. I see no reason that 12.04 will be any different.

I have taken to a different distro on the desktop since the release of 11.04. I do depend on my machines to get work done and just really haven’t had the time to play with Unity. Looking back maybe I should have stayed with Ubuntu 10.10 (or use the classic desktop in 11.04). During the last couple weeks of really taking inventory I have discovered something. Even though I do not currently use Ubuntu on my desktop every day, I am still depending on Ubuntu to get what I need done through the use of Ubuntu Server. My entire digital life is on my Ubuntu server. I write documentation for an Open Source project, its on my Ubuntu Server. I share files, printers, remote file access, all through my Ubuntu Server. My desktop operating system really is just providing a “shell” for me to access my Ubuntu Server.

This realization of how much I use Ubuntu Server has revealed something to me, Ubuntu, at its core is an excellent operating system. I have judged Ubuntu unfairly based on Unity. Yes, Unity needs work, but Ubuntu is still very good. Ubuntu is by far the easiest distro to set up and you can trust your grandparents can use it. I do have one thing that I am in constant wonder about. Should Ubuntu market non-LTS releases to the general population or should they target them to power users and developers who are more ok in general with things breaking? I think this might help with some of the backlash when new things are brought in like Unity, especially since the focus seems to be that Unity needs to be really good by 12.04.

With October nearing us, I have a new excitement to see what Oneiric is going to be like. I am also excited to know that with Unity now working as a shell for GNOME 3, that I can have my beloved GNOME Shell if I am unhappy still with Unity. As I look back now I clearly see the sky isn’t falling, its simply changing.

Categories: Experience

2 Comments

http://www.ubuntu-tennessee.org /