Go Back   PCMech Forums > Linux Support > Linux OS and Software Assistance

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 04-27-2012, 09:16 PM   #1
Member (7 bit)
 
m00nshine's Avatar
 
Join Date: Apr 2006
Posts: 81
Question Setting up remote access

Hello all,

I'm trying to use my ubuntu box as a file server by using ftp.

My problem is that I can't successfully remote into my computer.

What I'm trying to do is have the computer be accessible when only the power plug and ethernet cable are plugged in.

If I hook everything up to the pc (monitor, keyboard, mouse, etc.)
I can successfully log in.

If I attempt to boot up the pc with only the power plug and ethernet cable plugged in, I cannot access it via VNC.

Is there a way to make it boot into the os and be fully functional and accessible without the other peripherals plugged in?

Thanks.
__________________
Gaming Rig:

Gigabyte GA-Z68XP-UD3 | Intel Core i5 2500K Overclocked @ 4.2 GHz | CoolerMaster Hyper 212 Plus CPU Cooler | CORSAIR Vengeance 16GB DDR3 @ 1600 MHz RAM (4 X 4) | EVGA NVIDIA GeForce GTX 560 GPU | Antec High Current Gamer Series 620W PSU | Windows 7 Professional 64 bit

Secondary Box:

ASUS P5KPL-CM | Intel Core 2 Quad Q8300 @ 2.50 GHz | 4 GB DDR2 @ 800 MHz RAM (2 X 2) | ZOTAC GeForce GT 220 GPU | Antec High Current Gamer Series 520W PSU | Dual boot: Windows 8 64 bit / Ubuntu 12.10 64 bit


A+ Certified Technician
m00nshine is offline   Reply With Quote
Old 04-28-2012, 05:59 AM   #2
Member (11 bit)
 
Join Date: Apr 2003
Posts: 1,562
Are you using your ubuntu box as a file server for windows boxes? Also, do you have a graphical desktop running on your ubuntu file/ftp server? I assume yes since you are attempting to VNC into the ubuntu file server.
That's not the way it's usually done. Normally, for a file server or an ftp server, you would not have a graphical desktop installed. Typically, you run everything from the command line on the server. Then it's very easy to remotely login using ssh.
I am not that familiar with VNC, but I believe you have to be logged into a graphical session on the server before you can VNC into it. That puts you in a catch22 since you can't do that without a keyboard, mouse and monitor connected to the ubuntu box which defeats what you are trying to do.
Quote:
Is there a way to make it boot into the os and be fully functional and accessible without the other peripherals plugged in?
The answer is yes. First you set up ssh on the server; in ubuntu I believe you just have to install the the openssh-server package:

$ sudo apt-get install openssh-server

Then start the ssh server with:

$ sudo service ssh restart

Next time you reboot the ssh server should start and I believe your ftp server should autostart as well if that's the way you have configured your system. You are now ready to run your server headless, i.e. without keyboard, mouse, or monitor.
Next, on the client side, if the client is a linux box, it's easy. Start your server up headless. Once the booting stops, on your remote linux box run:

$ ssh -l [username on ubuntu server] [ip of ubuntu server]

The first time you remotely login to the server, you will get a security alert warning you that the server you are remotely logging into may not be the one you think it is and asking if you want to proceed. Say yes and you are then logged in at the command line at your ubuntu server. If the ftp server has not autostarted, you can do it from the command line with:

$ sudo service ftp start

At that point, the ftp server should be up and running and you should be able to transfer files using ftp on your client box.

Controlling the server from a windows client is a little more complicated. Windows doesn't have a native ssh client but a very good free one called "PuTTY" is available. Once putty is installed, the procedure is pretty similar except the remote login is done from the putty application. Here's a good article on how to use putty:

Using SSH in PuTTY (Windows)

Basically, all your really need to do with a headless server is have some means of logging in and that's what ssh provides. Once you are logged in the server is running and available to the other boxes on the network. If you need to you can even run commands on the server from your remote box once your logged in via ssh. While not strictly necessary, I wouldn't bother trying to remove the graphical desktop from your ubuntu server, especially if you are just using it on a local network. At some point down the line, you may want to hook up a keyboard, mouse and monitor to your ubuntu server for maintenance and having a graphical desktop may be convenient.
kilgoretrout is offline   Reply With Quote
Old 04-30-2012, 09:46 PM   #3
Member (7 bit)
 
m00nshine's Avatar
 
Join Date: Apr 2006
Posts: 81
Good deal, thanks dude.

OK, so I've set up SSH and FTP on my ubuntu box.

I've got a few questions:

Since FTP sends passwords in the clear, should I be worried about my password being compromised?

I believe I only have to worry about someone plugging into my home network and using a packet sniffer to obtain that information, correct? Those on the internet would have to get through my router's firewall to see that traffic, correct?

I was unable to get anonymous uploads to be written. I think this is because I did not create / specify a directory where data could be written. How would I go about doing this? I did uncomment the sections that allow for anonymous uploads. I got ftp to work by allowing local users to login.

So there is no way to VNC over to the box? I guess there isn't since X isn't starting due to lack of a monitor being connected to the box. Can anyone confirm this? It must be true because my VNC connections are unsuccessful.
m00nshine is offline   Reply With Quote
Old 05-02-2012, 09:37 AM   #4
Member (11 bit)
 
Join Date: Apr 2003
Posts: 1,562
Quote:
Since FTP sends passwords in the clear, should I be worried about my password being compromised?

I believe I only have to worry about someone plugging into my home network and using a packet sniffer to obtain that information, correct? Those on the internet would have to get through my router's firewall to see that traffic, correct?
You're right about passwords being sent in clear texts for standard ftp. If you are restricting the ftp server to a local home network, that's probably not a problem. If you are in a commercial local network setting or your ftp server is internet facing, you would never set things up that way. A more secure way of doing things is to use sftp:

What is SFTP, and how do I use it to transfer files? - Knowledge Base

It's like ftp through an ssh tunnel so everything is encrypted over the network. If you just want to copy a few files you can also use scp:

SSH and SCP: Howto, tips & tricks « Linux Tutorial Blog

Both sftp and scp are usually included as part of the open ssh package.

Exactly what you are trying to do and your setting are not entirely clear so it's hard to give security advice. However, if you just want a file server for your windows or linux boxes on your local home network, that would usually be done by setting up a samba on your linux file sever box. That's what most NAS devices are under the hood. I assume you have good reasons for using ftp but I thought I would mention the samba option in case you were unaware of it.
kilgoretrout is offline   Reply With Quote
Old 05-02-2012, 12:20 PM   #5
Member (7 bit)
 
m00nshine's Avatar
 
Join Date: Apr 2006
Posts: 81
My main concern was that my password would not be compromised.

My Ubuntu box is on my home network and plugged into my router.

At first, I was trying to set up ftp so that I could connect to it anonymously and upload / download files as needed.

I wanted to do this so that my password would not be sent over my network.

I could not get it to work, however, and I think that is due to the fact that I did not specify a directory to be used. I had tried before, but I could not get files to upload. I am unsure as to why it failed. I thought I had uncommented the correct sections, but maybe I did not. I also created a new directory and issued the commands in the ubuntu help page for ftp. It didn't work, so I tried to change the permissions on the folder to 777: chmod 777 /directory/ Then, after doing that, I couldn't connect via ftp at all.

But nevermind all that, I now have ftp working by enabling local users to log in.

As long as my password will be safe from users on the internet, I am fine with how it is set up.

I am just using the server as a place where I can save my most important files. I have them backed up to an external drive, but I wanted to copy them to another location. I felt that setting up ftp would allow me to do that and provide a means to have some fun with my old computer that I would not have used otherwise.
m00nshine is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are Off
Pingbacks are Off
Refbacks are On



All times are GMT -5. The time now is 02:45 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.1