Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Access via Putty

  1. #1
    Join Date
    Feb 2008
    Beans
    49

    Access via Putty

    I am a newbie trying to learn Ubuntu Server. So far, I have been having alot of success and I am enjoying the learning process. However, I can only access the server via the terminal on the server itself. I have been trying to use Putty to access it via SSH from my Windows desktop, but the connection times out every time and does not even get to the point where I get a prompt on the Putty screen.

    I installed the openssh-server via this command:
    sudo apt-get install openssh-server

    the server has a static ip address

    What am I doing wrong?

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

    Re: Access via Putty

    Do you have a router? If so, are you forwarding the SSH port through your router to the static IP address of the server? If not, the SSH request will never get past the router.

    Bob

  3. #3
    Join Date
    Feb 2008
    Beans
    49

    Re: Access via Putty

    We do have a router. I don't see why the request would go through the router because my desktop is on the same lan as the server.

  4. #4
    Join Date
    Feb 2008
    Beans
    49

    Re: Access via Putty

    excuse me, I should have said subnet, not lan!

    my desktop is on the same subnet as the server.

  5. #5
    Join Date
    Feb 2008
    Beans
    49

    Re: Access via Putty

    Interesting, I just realized that I cannot even ping the new Ubuntu server. Some kind of default security that would stop that? I gave the server a static ip and set the correct gateway. I can ping out from the server to any ip address local or remote.

  6. #6
    Join Date
    Feb 2008
    Beans
    49

    Re: Access via Putty

    OK. Problem was related to the fact that the ip address changed. I can connect now.

    So, I guess the question turns to this: How does one set a static ip address on ubuntu server? I used the command: sudo ifconfig eth0 x.x.x.x. netmask x.x.x.x

    and sudo route add default gw x.x.x.x

    Rebooted and it went back to DHCP

    How do I remove DHCP?

  7. #7
    Join Date
    Nov 2007
    Location
    London, England
    Beans
    6,007
    Distro
    Xubuntu 15.10 Wily Werewolf

    Re: Access via Putty

    First, check the port is open on the server. List the listening ports with this command:
    netstat -ltn
    and make sure you can see an entry for either :::22 or 0.0.0.0:22. If not, the server isn't listening.

    Second, see if you can telnet the server from the client with this command (use the correct IP address for the server of course):
    telnet 1.2.3.4 22

  8. #8
    Join Date
    Nov 2007
    Location
    London, England
    Beans
    6,007
    Distro
    Xubuntu 15.10 Wily Werewolf

    Re: Access via Putty

    Ah. that bit's easy.

    First, you should also look at the contents of /etc/resolv.conf while you are on DHCP, to see what the name server configuration should be. You may need to replace the config manually once DHCP is not doing it at boot-up.

    Second, edit /etc/network/interfaces. Comment out the line about DHCP and replace it with the static config details.
    Here is an extract from my file /etc/network/interfaces as an example:
    iface eth0 inet static
    address 192.168.1.101
    netmask 255.255.255.0
    gateway 192.168.1.1

  9. #9
    Join Date
    Feb 2008
    Beans
    49

    Re: Access via Putty

    I found that file and you are correct, it is set to dhcp. I will need to change that, however the file is read-only. So, I need to change the permissions first. I am not sure exactly what permissions I will need. I will need to look that over.

    Good learning!!

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

    Re: Access via Putty

    Quote Originally Posted by vegas588 View Post
    ...the file is read-only. So, I need to change the permissions first. I am not sure exactly what permissions I will need.

    You don't need to (and shouldn't) change the permissions of the file. Simply use sudo to temporarily become superuser and edit the file. As in:
    Code:
    vegas@myserver:~$ sudo nano /etc/network/interfaces
    Bob

Page 1 of 2 12 LastLast

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
  •