Set Up a Debian LAMP Test Server ยป Page 7
Setting up openSSH and Samba
First let’s install openSSH. Installing anything, as you may recall, is a task for the administrative account, root. You do not need to log out and back in to access this account, simply type “su” (super-user) at the prompt, and enter the password when asked. You should notice that the “$” at the end of each prompt has been replaced by a “#.” When you’re finished performing admin tasks, simply type “exit,” and you’ll return to your user’s “$” prompt.
So, type “su,” your root password, and to make sure you get the latest versions of the packages to be installed, type “aptitude update.” Once that’s done, install openSSH!
The command to install openSSH is highlighted in the red box above. As you can see, Debian will look for the package in the repository, resolve any unmet dependencies, and once confirmed by the user, install them. And people say Linux is hard.
Now, to test it out:
If you’re connecting from a Windows PC, a decent SSH client is Putty. Just load it up, enter your server’s information and hit “Open.” You will be asked about caching a key the first time you connect to a given server, just click on “yes.”
When Putty connects to the server, things should look familiar. Login, and while connected, why not configure the Samba server? Of course, if you prefer, do it from the server itself as we did for openssh, the commands will be identical. Switch to super-user mode (“su”), and edit the appropriate file by entering the command above. Nano is the editor I use. It will open up the smb.conf file as pictured below:
Append the following to the end of the file:
This will tell Samba to share the directory that Apache uses as the root web directory. This will allow for easy uploading of web content to the test server.
Save and exit. Now Samba will have to be restarted for it to use the new settings…
…almost forgot! Samba will require that you configure user accounts separate from the system accounts (unlike Windows where they’re one and the same):
It’s a fairly straightforward command. “smbpasswd” = “Samba Password,” “-a” = “Add,” followed by the username. Specify a password, and done. Samba will have to be restarted again.
Now try to connect via Windows Explorer to test it all out:
Perfect. Now that just leaves MySQL.













