Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: Help with SSH

  1. #11
    Join Date
    Jun 2007
    Location
    Leeds, UK
    Beans
    136
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Help with SSH

    Your explanation was perfect can now ssh to my server over the LAN. I will try and set up for external access tomorrow.

    Thanks!

  2. #12
    Join Date
    Sep 2007
    Beans
    134
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Help with SSH

    Glad you got it working.

    Let me anticipate your next question: How can I move files back and forth from my server with ssh?

    Two ways:

    1) using scp (secure copy), as in:
    Code:
    scp somefile me@myserver:
    Or use the -r (recursive) option to move whole directory.

    Code:
    scp -r somedirectory me@myserver:
    2) mount the server using sshfs (secure shell file system):
    Code:
    sshfs me@myserver:/home/me /media/server
    Mounting the server via sshfs then allows you to use your file manager to drag and drop. See this SSHFS overview for more detail.

    Bob

  3. #13
    Join Date
    Dec 2007
    Location
    Buenos Aires, Argentina
    Beans
    1,231
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Help with SSH

    Quote Originally Posted by hrod beraht View Post
    Glad you got it working.

    Let me anticipate your next question: How can I move files back and forth from my server with ssh?

    Two ways:

    1) using scp (secure copy), as in:
    Code:
    scp somefile me@myserver:
    Or use the -r (recursive) option to move whole directory.

    Code:
    scp -r somedirectory me@myserver:
    2) mount the server using sshfs (secure shell file system):
    Code:
    sshfs me@myserver:/home/me /media/server
    Mounting the server via sshfs then allows you to use your file manager to drag and drop. See this SSHFS overview for more detail.

    Bob
    Also, and if you are going to connect to your Ubuntu server from a Windows box, to copy files you have:

    With GUI:
    WinSCP
    FileZilla

    Without GUI:
    pscp (From the same people that brought you PuTTY! )

    All of these programs are free, and in the case of Filezilla, it can also work on a Linux box as well.
    Live long and prosper.
    And use lotsa Linux, BSD, and Emacs.

  4. #14
    Join Date
    Jun 2007
    Location
    Leeds, UK
    Beans
    136
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Help with SSH

    Yes sharing files and folders was one of my next questions but the next part I want to get working is access over the web.

    I have set up a DynDNS account and have forwarded ports 22 SSH and 80 http from my router to my server

    An example of my DynDNS host name is:

    iam.boldlygoingnowhere.org

    When I put http://iam.boldlygoingnowhere.org into my browser I get a message saying 'It Works!'
    Not sure what I can achieve using the browser, possibly one to worry about later?

    When I type ssh iam.boldlygoingnowhere.org into a terminal of a PC on my Lan I get a password request but when I enter the password for my server I get:

    Permission denied, please try again.

    Now sure why this is happening think I might need to change the /etc/hosts/ file on my server but I'm not sure?

    I have also installed ddclient and have edited the ddclient.conf file as detailed in the various tutorials I have found and it seems to be OK, no errors after running sudo /etc/init.d/ddclient restart
    Last edited by roundhay; November 22nd, 2008 at 12:17 PM. Reason: installed ddclient

  5. #15
    Join Date
    Jun 2007
    Location
    Leeds, UK
    Beans
    136
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Help with SSH

    Ignore the post above, I was not putting the user name in!

    using username@iam.boldlygoingnowhere.org works a treat!

  6. #16
    Join Date
    Jun 2007
    Location
    Leeds, UK
    Beans
    136
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Help with SSH

    OK I have managed to set up SSH to authenticate using keys and have turned of the password access.

    I can access my server over my LAN my my desktop PC using:

    SSH username@servername

    and can access using keys from a puppy linux USB O/S plugged into my work laptop over my LAN using:

    ssh username@iam.boldlygoingnowhere.org

    I tried to access from my office today over the web using the same ssh command but did not get any connection, I didn't even get an error message. How long does ssh take to connect over the web? I assume it would be quick in which case my ssh command must not have found the server. Will I have to work on my DNS settings?

    I could access the 'It Works!' apache server page from work by typing:

    http://iam.boldlygoingnowhere.org

  7. #17
    Join Date
    Dec 2007
    Location
    Buenos Aires, Argentina
    Beans
    1,231
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Help with SSH

    From your work, I suggest a network test before.
    Type, from either a Linux or Windows (from a CMD window):

    Code:
    telnet your.public.IP 22 (ENTER)
    If nothing happens in, say, 2 minutes, you have a problem reaching the SSH port, perhaps it is not forwarded correctly -doubt full, since you can reach Apache-, or there is a firewall blocking access, on your Ubuntu Server from the IP address from your work?
    Or your work has a firewall enabled that blocks outgoing SSH?
    You can test the port forwarding within your LAN using the same commando from above.
    Last edited by hictio; November 26th, 2008 at 09:47 PM.
    Live long and prosper.
    And use lotsa Linux, BSD, and Emacs.

  8. #18
    Join Date
    Jun 2007
    Location
    Leeds, UK
    Beans
    136
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Help with SSH

    The telnet command seemed to work over the LAN
    Trying **.*.***.***...
    Connected to **.*.***.***.
    Escape character is '^]'.
    SSH-2.0-OpenSSH_5.1p1 Debian-3ubuntu1
    Connection closed by foreign host.

    I'll try this tomorrow from work and see if it works.

    If it does not can I assume that port 22 SSH connects are being block?

    If yes then it looks like I'll be stopping at McDonalds on the way home to try over their wifi!

  9. #19
    Join Date
    Dec 2007
    Location
    Buenos Aires, Argentina
    Beans
    1,231
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Help with SSH

    Quote Originally Posted by roundhay View Post
    The telnet command seemed to work over the LAN
    Trying **.*.***.***...
    Connected to **.*.***.***.
    Escape character is '^]'.
    SSH-2.0-OpenSSH_5.1p1 Debian-3ubuntu1
    Connection closed by foreign host.

    I'll try this tomorrow from work and see if it works.

    If it does not can I assume that port 22 SSH connects are being block?

    If yes then it looks like I'll be stopping at McDonalds on the way home to try over their wifi!
    On your LAN it has work, since you can connect to your Ubuntu Server from other boxes.
    If you can, from your own LAN, try connecting to the public IP as well.
    The test from the Mc Donalds seems good.
    Are you sure you don't have any internal firewall on your Ubuntu server limiting connections to the network range of your LAN?
    Live long and prosper.
    And use lotsa Linux, BSD, and Emacs.

Page 2 of 2 FirstFirst 12

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
  •