Connecting fine to Ubuntu with ssh but not to Debian

Discussion in 'Debian' started by alexandros301, Mar 26, 2014.

  1. alexandros301

    alexandros301 Member

    Joined:
    Mar 22, 2014
    Messages:
    40
    Likes Received:
    0
    I first made an Ubuntu image and started using Udoo with this. I can easily connect via ssh, but when I tried with Debian I got this in the terminal:

    Code:
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
    Someone could be eavesdropping on you right now (man-in-the-middle attack)!
    It is also possible that a host key has just been changed.
    The fingerprint for the RSA key sent by the remote host is
    02:d5:2b:40:a0:82:d4:f0:45:65:50:57:cc:31:e0:7d.
    Please contact your system administrator.
    Add correct host key in /Users/alexandrosdrymonitis/.ssh/known_hosts to get rid of this message.
    Offending RSA key in /Users/alexandrosdrymonitis/.ssh/known_hosts:4
    RSA host key for 192.168.2.12 has changed and you have requested strict checking.
    Host key verification failed.
    When I log in my router, whether I use the Ubuntu or Debian SD, I see this
    Code:
    name=udoo-debian-hfp
    as a name of the connected device. When I'm using the Ubuntu SD I type this in the terminal
    Code:
    ssh -X ubuntu@IP_address
    and when I use the Debian SD I type
    Code:
    ssh -X debian@IP_address
    but can't log in with Debian. Any ideas?
     
  2. alexandros301

    alexandros301 Member

    Joined:
    Mar 22, 2014
    Messages:
    40
    Likes Received:
    0
    It's the Debian Wheezy image from Udoo's website, forgot to mention it...
     
  3. peter247

    peter247 New Member

    Joined:
    Mar 10, 2014
    Messages:
    263
    Likes Received:
    2
    I think the problem is you have change images and still using the same ip address .

    eg with Putty when you change images you get a the keys have changed , someone may be trying to break in etc , because the keys have change from one image to the other and Putty recorded the keys it last used .

    Somehow you need to add the new keys .
     
  4. alexandros301

    alexandros301 Member

    Joined:
    Mar 22, 2014
    Messages:
    40
    Likes Received:
    0
    But when I log in my router I see the same ip address...is there some other way to find out the ip address when using the Debian SD?
     
  5. peter247

    peter247 New Member

    Joined:
    Mar 10, 2014
    Messages:
    263
    Likes Received:
    2
    ifconfig
     
  6. alexandros301

    alexandros301 Member

    Joined:
    Mar 22, 2014
    Messages:
    40
    Likes Received:
    0
    I guess ifconfig only works when you've already attached a monitor and a keyboard to Udoo. What if you only program it via Ethernet? When I change SD cards, does the IP change (maybe it's an obvious matter, but don't know much about it)? If so, when I put the new SD, according to Udoo's tutorials, I have to log in my router from my laptop and there I can see which devices are connected to the router and their IPs, but the Udoo appears to have the same IP whether I use the Ubuntu or the Debian SD...
     
  7. peter247

    peter247 New Member

    Joined:
    Mar 10, 2014
    Messages:
    263
    Likes Received:
    2
    The normal ways are connect via SSH , Connect to the Serial USB serial port and log in like you would with SSH.
    Check the router , which if it`s getting it`s address with dhcp should show up somewhere in attached devices etc.
     
  8. alexandros301

    alexandros301 Member

    Joined:
    Mar 22, 2014
    Messages:
    40
    Likes Received:
    0
    OK, managed to log in serially, but Serial Tools (in OS X) looked rather buggy, all letters I typed were typed twice and symbols indicating directories were displayed in ASCII which made the whole thing look very weird. I changed the IP though and logged in via SSH from the terminal and it's quick OK.
    There's another problem now though, when I try to instal something with aptitude (for example libtool) I get this
    Code:
    The following NEW packages will be installed:
      autotools-dev{a} libltdl-dev{a} libtool 
    0 packages upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
    Need to get 894 kB of archives. After unpacking 2541 kB will be used.
    Do you want to continue? [Y/n/?] Y
    WARNING: untrusted versions of the following packages will be installed!
    
    Untrusted packages could compromise your system's security.
    You should only proceed with the installation if you are certain that
    this is what you want to do.
    
      libtool autotools-dev libltdl-dev 
    
    Do you want to ignore this warning and proceed anyway?
    To continue, enter "Yes"; to abort, enter "No": Yes
    Err http://ftp.us.debian.org/debian/ wheezy/main autotools-dev all 20120608.1
      Cannot initiate the connection to ftp.us.debian.org:80 (128.61.240.89). - connect (101: Network is unreachable) [IP: 128.61.240.89 80]
    Err http://ftp.us.debian.org/debian/ wheezy/main libltdl-dev armhf 2.4.2-1.1
      Cannot initiate the connection to ftp.us.debian.org:80 (128.61.240.89). - connect (101: Network is unreachable) [IP: 128.61.240.89 80]
    Err http://ftp.us.debian.org/debian/ wheezy/main libtool armhf 2.4.2-1.1
      Cannot initiate the connection to ftp.us.debian.org:80 (128.61.240.89). - connect (101: Network is unreachable) [IP: 128.61.240.89 80]
    0% [Working]perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
    	LANGUAGE = (unset),
    	LC_ALL = (unset),
    	LC_CTYPE = "UTF-8",
    	LANG = (unset)
        are supported and installed on your system.
    perl: warning: Falling back to the standard locale ("C").
    locale: Cannot set LC_CTYPE to default locale: No such file or directory
    locale: Cannot set LC_ALL to default locale: No such file or directory
    E: Failed to fetch http://ftp.us.debian.org/debian/pool/main/a/autotools-dev/autotools-dev_20120608.1_all.deb: Cannot initiate the connection to ftp.us.debian.org:80 (128.61.240.89). - connect (101: Network is unreachable) [IP: 128.61.240.89 80]
    and I can't install anything actually. It looks like an internet connection, or am I wrong? Udoo is connected to the router via Ethernet..
    Any tips?
     
  9. peter247

    peter247 New Member

    Joined:
    Mar 10, 2014
    Messages:
    263
    Likes Received:
    2
    I got that at first :-

    try : apt-get update ... then .... apt-get upgrade

    Also check for "apt-get install ntpdate" which sets the clock via the internet and "apt-get install locales" , and type "update-locale"

    BUT that also look like a DNS problem too.

    check /etc/resolv.conf

    which should contain your dns gateway eg your router`s ip address or add this to the file.

    nameserver 208.67.222.222 #<-- add this
    nameserver 208.67.220.220 #<-- add this

    which is opedns nameservers
     
  10. alexandros301

    alexandros301 Member

    Joined:
    Mar 22, 2014
    Messages:
    40
    Likes Received:
    0
    Is it apt-get or aptitude? What's the difference between the two?

    You're helping me out a lot, thanks!
     
  11. peter247

    peter247 New Member

    Joined:
    Mar 10, 2014
    Messages:
    263
    Likes Received:
    2
  12. alexandros301

    alexandros301 Member

    Joined:
    Mar 22, 2014
    Messages:
    40
    Likes Received:
    0
    you're right...

    Though apt-get update didn't work, it still looks like there's some internet connection problem...
    Another problem is that after I changed Udoo's IP following this link http://www.cyberciti.biz/faq/linux-change-ip-address/ and logged in via SSH, I tried to temporarily change its IP to 192.168.2.13 (it was 192.168.2.12, the same as the Ubuntu SD) following this link http://www.cyberciti.biz/tips/howto...configuration-to-static-ip-configuration.html. Logging out and back in seemed to work, but when I powered it off it restored its default settings, so every time I have to repeat the whole process.
     
  13. peter247

    peter247 New Member

    Joined:
    Mar 10, 2014
    Messages:
    263
    Likes Received:
    2
    I edited my last post , so I don`t think you saw my added bit.

    BUT that also look like a DNS problem too.

    check /etc/resolv.conf

    which should contain your dns gateway eg your router`s ip address or add ( change it to ) this .

    nameserver 208.67.222.222 #<-- add this
    nameserver 208.67.220.220 #<-- add this

    which is opedns nameservers

    ALSO in "/etc/network/interfaces" ADDING THIS TO MAKE IT USE DHCP FROM THE ROUTER
    ( when I say adding I may mean changing what`s in there )

    Code:
    # The loopback network interface
    auto lo
    iface lo inet loopback
    
    # The primary network interface
    allow-hotplug eth0
    iface eth0 inet dhcp
    So my way of testing the system out is :-

    ifconfig ... Do you have a ip address ... if not set it with "/etc/network/interfaces"
    check /etc/resolv.conf that is is set to my routers ip address ( DNS )
    check route ... the default gateway should be my routers ip address

    That should fix 99.9% of problems
     
  14. alexandros301

    alexandros301 Member

    Joined:
    Mar 22, 2014
    Messages:
    40
    Likes Received:
    0
    Tried but had no success. I did find a work around though. If I want to do anything with the internet, I connect serially and I can download whatever I want. Then I temporarily change Udoo's IP and I can connect over SSH and program it further. It is quite a work around, but at least I can use it...
    BTW, is there a way to connect via SSH by connecting Udoo's Eathernet straight to my laptop?
    Code:
    ssh -X debian@IP_address
    won't work...
     

Share This Page