Shop OBEX P1 Docs P2 Docs Learn Events
How to access Ubuntu laptop remotely? — Parallax Forums

How to access Ubuntu laptop remotely?

john_sjohn_s Posts: 369
edited 2011-09-23 22:53 in General Discussion
While learning a bit of Ubuntu flavour I came across a need to access it from a distant location i.e. remotely.
That particular laptop uses a static IP address, and I'd like to remotely replace a file in one of the Ubuntu's directories.

What would you recommend - is there a simple way to do it ?

Thanks,
John

Comments

  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2011-09-21 09:50
    I believe you would want to use 'ssh', the secure shell feature. It would be able to set up a remote 'terminal mode' session with your Ubuntu computer.

    If you want to replace a file in your /home directory, no additional security manipulation would be needed. But if you wanted to do more low level administrative work, you would have to login via the 'sudo' command.
  • Martin_HMartin_H Posts: 4,051
    edited 2011-09-21 09:55
    To use SSH you'll have to enable sshd in the Ubuntu admin console. You can also create remote X windows sessions and have a full GUI on another machine, but that's more work just to move a file.
  • Mike GMike G Posts: 2,702
    edited 2011-09-21 10:02
    Most importantly, you need to forward port traffic to the Ubuntu PC. Is the PC on a home network?
  • RDL2004RDL2004 Posts: 2,554
    edited 2011-09-21 10:10
    If this Linux laptop happens to need to be accessed from a Windows machine, you can use PuTTY.

    http://www.chiark.greenend.org.uk/~sgtatham/putty/
  • john_sjohn_s Posts: 369
    edited 2011-09-21 10:52
    Mike G wrote: »
    Is the PC on a home network?

    No, its approx an hour drive distance away.
  • john_sjohn_s Posts: 369
    edited 2011-09-21 10:56
    RDL2004 wrote: »
    If this Linux laptop happens to need to be accessed from a Windows machine, you can use PuTTY.

    Yes, that will be the case (mostly jpg and txt files).
  • Mike GMike G Posts: 2,702
    edited 2011-09-21 11:15
    John, is the pc connected to the internet? If so, how? What is your IP?
  • john_sjohn_s Posts: 369
    edited 2011-09-21 13:02
    Mike G, that laptop is connected to an IP via wireless link. It has a static IP address and I can access it from my pc remotely, but only to read some sensors data using another custom built application that runs under Ubuntu. What I need is to get into the Ubuntu directories itself so I can deposit my own jpg or txt files.
  • WBA ConsultingWBA Consulting Posts: 2,935
    edited 2011-09-21 13:08
    I recently found out about Teamviewer, which may work. It's essentially a super easy to use remote desktop software package...... and free. It probably doesn't support direct file transfer, but I have uploaded files to an FTP site and then downloaded them remotely to do file transfers remotely.
  • Mike GMike G Posts: 2,702
    edited 2011-09-21 13:58
    John, if you already have a dedicated connection why not fire up FTP service on the laptop.

    EDIT: I just installed vsftpd and within 2 minutes I'm FTPing between my Win box to my Linux box using the FileZilla FTP Cient.
    http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch15_:_Linux_FTP_Server_Setup
  • icepuckicepuck Posts: 466
    edited 2011-09-21 15:43
    This is what I use to get to my Linux box from windows.
    http://www.nomachine.com/products.php
    -dan
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2011-09-21 19:18
    You should probably use secure copy (SCP) for this. Anything that's not encrypted (including the wireless connection...) will probably be compromised at some point.
  • SRLMSRLM Posts: 5,045
    edited 2011-09-21 20:56
    From one Ubuntu box to another, you can remotely connect via Nautilus (the default Ubuntu file browser) by pressing ctrl+L, then typing in "sftp://ip_address". This is handy because it creates a remote mount point and it appears as just another folder on your computer. Also handy is F3, split pane view.

    SSH is good for running commands remotely via command line, and SFTP is good for moving files between two computers. It's pretty simple.

    As a side note, if the computer that you want to access is behind a firewall, then from that computer you can reverse SSH into a public server, and then you'll be able to SSH into the restricted machine from another computer via the public server. It's handy when you have no control over the routers.
  • john_sjohn_s Posts: 369
    edited 2011-09-21 20:56
    Kevin Wood wrote: »
    You should probably use secure copy (SCP) for this. Anything that's not encrypted (including the wireless connection...) will probably be compromised at some point.

    I guess it's encrypted wireless as it was the ISP guy who did the original wireless Access Point installation. I provided them with laptop's MAC address and they used some kind of out-of-the-box contraption with antenna to establish internet link to their ISP tower located miles away yet clearly visible above the horizon. I just hooked up that Linux laptop using a cable from its ethernet port to their POE little box and it works.
  • TorTor Posts: 2,010
    edited 2011-09-22 01:38
    john_s wrote: »
    I guess it's encrypted wireless as it was the ISP guy who did the original wireless Access Point installation. I provided them with laptop's MAC address and they used some kind of out-of-the-box contraption with antenna to establish internet link to their ISP tower located miles away yet clearly visible above the horizon.
    They may be using that link for other customers as well, and if so the encryption won't help.. everyone on the same network can potentially monitor all the IP traffic. It's like when you're in a cafeteria with wi-fi access where you still have to get their WPA key to connect: Traffic is encrypted, but only to those without the key.. for those on the network all the data packages are plainly visible and can be read.

    You really need the end-to-end encryption provided by SSL (e.g. via some kind of VPN) or SSH. The built-in support for mounting remote filesystems via ssh in Nautilus, as suggested by SRLM, is easy and secure.

    Alternatively, instead of FTP it would be much better to use SFTP. SFTP emulates the FTP user experience (but not the protocol) over SSH.

    -Tor
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2011-09-22 01:50
    Yes, maybe another or additional option is a better choice - setting up a VPN (Virtual Private Network) relationship.

    This would be encrypted, like ssh - but you would be viewed as a member of the network at the other end.

    I must admit I am having a bit of a problem with terminology though as Wikipedia includes SSH as one of many VPN choices.

    http://en.wikipedia.org/wiki/Virtual_private_network

    The main idea is that you tunnel through the web to your target computer with a secure, encrypted link and are able to use the file system. Some are GUI related, but that just makes them more complex.
  • john_sjohn_s Posts: 369
    edited 2011-09-22 10:11
    Tor / Loopy,

    Great - so I need to travel to that remote site where that laptop is located, and do some manual install of some kind of 'VPN client' on that machine, correct?
  • mindrobotsmindrobots Posts: 6,506
    edited 2011-09-22 11:07
    Unless something was left running on the remote machine and there are holes in the router to get through to it, a trip to the remote location will be needed. Since all this started with you asking "how do I...", I assume none of this is in place. I would try some of the suggested solutions locally with an identical setup so you can evaluate and practice. Once you get to the remote location, you really don't want any surprises and have to reinvent your planned solution or realize you forgot a piece of SW, cable, note, phone number, etc.
  • john_sjohn_s Posts: 369
    edited 2011-09-22 12:04
    mindrobots wrote: »
    ... I would try some of the suggested solutions locally with an identical setup so you can evaluate and practice. ....

    Sounds like a plan - fortunately I have another Ubuntu laptop next to me locally to experiment with before my trip to that remote one. Thanks, John
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2011-09-23 06:42
    SSH client goes on your computer, SSHD goes on the other one (That is a daemond, which Ubuntu already has, just needs to be activated).

    You can use PUTTY, which now includes SSH as a feature and that will install on a Windows, an Apple, or a Linux machine. Visit the site and download which you want.

    All these programs create a secure tunnel to the other computer. The old way, was TELNET - but anyone could see your passwords and what you were doing.

    If you feel that you need an FTP application, Ubuntu has one that tunnels as well. It is NOT called SFTP. Why not try the Ubuntu Forum for detailed support? I specifically avoided the GUI type remote interface as it is more complex to install. If SSH does everything you need, there really is no need to make this more complex. After all, if you understand the security, it is likely to be more secure.

    If you want, you can have the Ubuntu machine turn on and off the SSHD at certain times or on certain days of the week. Linux is flexible and likely to be more secure than alternatives, just because you understand the risks.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2011-09-23 09:29
    OpenSSH website explains it all.

    http://www.openssh.com/
  • john_sjohn_s Posts: 369
    edited 2011-09-23 11:42
    Sounds like another weekend project - back to my reading desk :)
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2011-09-23 22:53
    It really is not that complicated. Once the SSHD is set up, you can either use regular SSH or Putty-SSH to contact it. If you want to have other features, OpenSSH offers them - but I am not sure about where the repositories are for download.

    I'd just try SSH or Putty-SSH and see if you can do what you want with it. You can get that up and running in 15 minutes, easily

    SSHD provides an open port for SSH, but it sends back a verification to your computer before opening the port to further exchanges. Then all data is encrypted, so it cannot be snooped - including logins. It would take quite a bit to hack into because it isn't merely opening a port to your remote computer, there is some sort of handshaking involved.
Sign In or Register to comment.