Results 1 to 9 of 9

Thread: "Connect to server..." from command line?

  1. #1
    Join Date
    Oct 2008
    Beans
    4

    "Connect to server..." from command line?

    Hey all,
    Just made the switch to Ubuntu (Hardy) and have been so impressed since day one. Still very much a beginner, but definitely find myself getting better all the time. At the moment, I'm trying to mount an sftp connection at startup. I currently do it with Connect To Server->SSH, which works great but I'd really like it to be done automatically. If I had the command for the connect to server, I could do it, or if anyone has any other suggestions I would really appreciate them.

    Thanks,
    Jhurwich

  2. #2
    Join Date
    Aug 2007
    Beans
    96

    Re: "Connect to server..." from command line?

    Where do you want the mount point to be?
    To learn about the commands in a terminal type
    man sftp
    Last edited by kevstar31; October 26th, 2008 at 01:15 AM.

  3. #3

    Re: "Connect to server..." from command line?

    the command is
    Code:
    ssh ipaddress
    for more info try:
    https://help.ubuntu.com/community/SSHHowto

    to execute it at start up go to System > Preferences > Sessions
    then click the Add button and enter the command there

  4. #4
    Join Date
    Oct 2008
    Beans
    4

    Re: "Connect to server..." from command line?

    I think connect to server has been mounting it to the root directory, but I don't really mind where it ends up as long as I can still access it somehow.

  5. #5
    Join Date
    Oct 2008
    Beans
    4

    Re: "Connect to server..." from command line?

    berriop:
    I've been able to use the command line to connect to the space by ssh, but what I'd like to do is mount the space so I can access it in Nautilus. Connect to server does this in gnome, but I can't figure out how to do it at startup.

  6. #6
    Join Date
    Aug 2007
    Beans
    96

    Re: "Connect to server..." from command line?


  7. #7
    Join Date
    Jan 2007
    Beans
    Hidden!

    Re: "Connect to server..." from command line?

    If the server is on a local, secure network, take a look into NFS.

    If you want access over the internet, I recommend SSHFS. It is very lightweight, the drawback is that it doesn't show you the free disc space on your server and sometimes doesn't recognize symlinks.
    Just install it via Synaptic, add yourself to the fuse group (system->administration->users and groups), then log out of your GNOME session and back in.
    You can add this to your system->preferences->sessions or to a launcher on your desktop/panel/dock/...:
    Code:
    sshfs user@server:/server/dir /local/dir
    where /server/dir is the folder on your server and /local/dir is the folder you want to mount to. You must first create the local folder!

    Another more simple solution is to make a launcher on your desktop, where the command is "nautilus sftp://servername"

    EDIT: yay, obviously I'm playing redundancy-man

  8. #8
    Join Date
    Oct 2008
    Beans
    4

    Re: "Connect to server..." from command line?

    Thanks bryonak, went with the nautilus command and it works beautifully.

  9. #9
    Join Date
    Sep 2009
    Beans
    72

    Re: "Connect to server..." from command line?

    Thanks from me too, bryonak - just a note to self: so the syntax is NOT:
    Code:
    nautilus-connect-server ssh://127.0.0.1
    ... NOR:
    Code:
    nautilus-connect-server sftp://127.0.0.1

    ... but it is, instead:
    Code:
    nautilus sftp://127.0.0.1
    Cheers!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •