0

I am on Ubuntu. My Pi's static IP is 169.254.0.2. The Ubuntu Ethernet connection I have for it has the same static IP and gateway for IPv4. I don't have the IPv6 settings configured at all for that connection.

Anyway. I can ping the pi, and when I ssh to pi@ip.address it successfully connects and requests the username, but when I give it the password it says permission denied. I can ssh over puTTY in Windows 7, but I've tried this on Ubuntu using the command line and Linux puTTY and no dice.

$ ifconfig

eno1      Link encap:Ethernet  HWaddr 5c:26:0a:5f:46:22  
          inet addr:169.254.0.2  Bcast:169.254.0.255  Mask:255.255.255.0
          inet6 addr: fe80::f48c:b007:86a1:20ac/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:21 errors:0 dropped:0 overruns:0 frame:0
          TX packets:477 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:6347 (6.3 KB)  TX bytes:69932 (69.9 KB)
          Interrupt:20 Memory:e2d00000-e2d20000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:36094 errors:0 dropped:0 overruns:0 frame:0
          TX packets:36094 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:3093674 (3.0 MB)  TX bytes:3093674 (3.0 MB

Is there something I am doing wrong with my ethernet connection or what?

Update: After changing the IP address to 192.168.1.23, ssh does not connect from either partition, Windows or Linux. Before it did connect, but not accept the password. I will change it back as soon as I can.

  • 1
    Please do not add "SOLVED" and do not write an answer in the question. This is not how StackExchange works. You can add your own answer in the answer field – techraf Dec 14 '16 at 4:45
1

Addresses starting with 169.254 are special private addresses (called Link-local address or APIPA - Automatic Private IP Addressing) assigned when no DHCP server is available. Basically they are meant as an automatic, temporary workaround for a machine that cannot get a regular IP address and you should not rely on them for connections.

Particularly they will not be routed, so it's the reason why you cannot reach your Pi from Ubuntu on the Ethernet.

At the same time Microsoft handles these addresses specially to allow connections (How to use automatic TCP/IP addressing without a DHCP server) and this might explain why you get a connection from Windows.


You should set a static address on your Pi or connect it to a network with DHCP server so it obtains a regular address.

Once you have that fixed, you can proceed with debugging SSH connection (if the problem persist, but it's likely it will go away).

  • This sounds very promising. Thanks for your advice, I'll let you know if it works. I just got that address from a tutorial somewhere and I'd like to be able to rely on my own knowledge of this so I really appreciate the links. – Dan P Dec 9 '16 at 1:26
  • I tried changing the ip address of the pi to 192.168.1.23 (static) and it didn't work- it successfully connected via ssh, but it rejected the password. And now I can't ssh into it from Windows. Any suggestions? – Dan P Dec 10 '16 at 1:10
  • So update your question with the relevant information. Repeating "it's not working" will not get you any answers. – techraf Dec 10 '16 at 1:13
  • I updated my question, but it isn't fair for you to say I repeated it's not working. I'd have appreciated some guidance as to what I could have done differently with the IP address and I regret you took that the wrong way, but I finally found an address that works on my own. I posted the link and code above. – Dan P Dec 14 '16 at 4:30
  • I don't know what you could have find differently. You are sitting in front of your computer, not me. The only thing I (and other users) know is what you decide to write and post here. – techraf Dec 14 '16 at 4:49
0

SSH is made secure by exchanging keys. The key for the remote is stored in a file in the .ssh directory in your home directory. The entry in the file includes the IP address of the remote. A new ip means a new entry is needed.

0

I changed the IP address to 192.168.1.101 and it works like a charm. The bottom of my dhcpcd.conf file is as follows:

interface eth0
static ip_address=192.168.1.101/24
static routers=192.168.1.1
static domain_name_servers=192.168.1.1
interface wlan0
static ip_address=192.168.1.201/24
static routers=192.168.1.1
static domain_name_servers=192.168.1.1

which I got from here

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.