Click to See Complete Forum and Search --> : Need Help with setting up webserver/ssh/scp.
Lucas_Maximus
10-29-2005, 12:18 PM
I have a P3 box that I would like to use so I can host a webpage, I also wnat to use the computer for transferring files while I am on univerisity campus, my mate said i can use SSH/SCP to do this.
My friend also directed me to this site https://www.dyndns.com/ but I dunno really understand how I can fit it all together.
I was thinking about using debian sarge to run the server on.
can anyone point in the right direction on what to do?
DaijoubuKun
10-29-2005, 03:26 PM
for starters, most any Distro will give you everything you need. SSH, SFTP, Apache (www), and so on.
SSH is easy, it just gives you a shell account from anywhere. I use SSH all the time, it's great. SFTP can be used in conjunction with SSH for file transfers, but can sometimes be difficult to get going.
For FTP I use 'PureFTPd'. It stable and secure, with virtual user options. But that's your choice there.
I don't think I ever seen a distro not come with apache, so you should be good on www. just configure your httpd.conf file to match your settings (you may have to search for the file, usually I see it in /etc/apache/ )
www.dyndns.org will give you a host name (ie, yourname.dyndns.org) that will point to your computer. If your IP changes tho, you will have to update dyndns.org.
I hope that all made sence, I run so many different types of services that I can't remember very well how I have then setup or if I have em running (can you believe I had an IRC server running for over 6 months and I forgot I even had it! :D )
mmills
10-29-2005, 03:27 PM
links:
http://www.linuxsecurity.com/content/view/117549/49/
http://www.debian.org/devel/passwordlessssh
hope this helps....... :o
I would like to do the same but I dont have a space pc, just a laptop.
Well, is your ip static? If so, then there's no problem. Now, if your ip is dynamic and it changes everytime you connect to internet, then you will need a dynamic-dns to know where's your box when you're at the campus.
You can register your dynamic-dns here (https://www.dyndns.com/services/dns/dyndns/), you will have to choose a domain, like lucas_maximus.homeftp.org and you will have to dowload a little program that runs in the background on your box. This program checks every 5 minutes if the IP is the same, if it has changed it updates it against your domain.
This is kinda how it all works, hope it helps.
mmills
10-29-2005, 08:07 PM
found some nice info here, very detailed on apache for debian. I may refer to this site when I get a spare box to run mine off of. :D
http://www.aboutdebian.com/internet.htm <----server helper site.
Lucas_Maximus
10-30-2005, 05:11 AM
Thanks guys for all the information. I going to setup the apache first and then go from there.
bwkaz
10-30-2005, 03:15 PM
SFTP can be used in conjunction with SSH for file transfers, but can sometimes be difficult to get going. scp is MUCH easier, in my experience. Just:
scp yourusername@yourmachinename:file .
to copy a file named "file" from the home directory of "yourusername" on machine "yourmachinename". "yourmachinename" can be an IP address, too.
To copy a file the other way:
scp file yourusername@yourmachinename:
(the : is required).
You can use absolute paths after the : also:
scp yourusername@yourmachinename:/etc/inittab .
to copy the inittab file. Also, if you're logged into the local machine as a user who has the same name as the user that you want to log in as on the remote machine, you can omit "yourusername@".
For FTP Personally, I'd forget about FTP entirely. Your username and password will be passed over the Internet in clear text for (almost) anyone to sniff, and so will the files that you transfer. Plus FTP has problems with NAT: if the machine you FTP from is behind a dumb NAT box, you can't do active FTP, and if the machine you FTP to is also behind a (different) dumb NAT box, you can't do passive FTP either. Sure, you can do FTP proxying (at least with some browsers -- not with Windows 2000's FTP client, and I'm not sure about inetutils' FTP client), but that requires a much smarter NAT box. If you have a Linux box as your NAT device, you could do connection tracking, which will open up the proper ports at the proper times, by inspecting the FTP control connection traffic. But that seems like a huge hack to me.
scp, OTOH, is just one TCP-port-22 connection, so it can be NATed on either end. (And it encrypts the whole connection, including the username/password and the actual file transfer.)