BigJ
Posts: 3
Joined: Tue Sep 27, 2016 4:48 am

Raspberry Pi 2 Model B password not working

Tue Sep 27, 2016 7:14 am

My Raspberry pi 2 Model B is connected to the MacBook via Ethernet. The OS installed is Raspbian Jessie.

In the Terminal, when I try to login with the command, ssh [email protected] , the following appears:
"The authenticity of host 'XXX.XXX.XX.XX' can't be established.
ECDSA key fingerprint is SH....o4.
Are you sure you want to continue connecting (yes/no)?"

I type Yes. It then asks for a Password. I type raspberry. But it asks for a password 2 more times. After entering the password the 3rd time, this message appears, "Permission denied (publickey,keyboard-interactive)."

Please help me Log into my Rpi.

BigJ
Posts: 3
Joined: Tue Sep 27, 2016 4:48 am

Re: Raspberry Pi 2 Model B password not workingy

Tue Sep 27, 2016 8:09 pm

Problem Solved !

I connected the Pi with an HDMI cable to a separate Monitor, keeping the Thunderbolt ethernet connection with the MacBook pro.
On the RPi interface on the separate monitor, I gave the command ifconfig and noted the inet address.

The 'inet address' was different from the one I found in the System Preferences -> Network -> Thunderbolt ethernet -> 'IP address'. I had saved a manual IP address a few months ago in the Rpi which was 192.168.10.10. Now the RPi wasn't accepting the IP address on the MacBook, which was 169.257.46.2 and had retained the one I had manually entered.

I then entered sudo ssh [email protected]. Following that, I was prompted for the user account password and then a 2nd password for the Pi which is (raspberry)

I then tried without the sudo command and tried the command ssh [email protected](192.168.10.10) and then entered the password raspberry.
It then let me in the Pi.

My honest suggestion is to use a Linux or Windows environment to communicate with the raspberry pi. The Mac OS can get complicated and time consuming at times.
Last edited by BigJ on Wed Sep 28, 2016 3:04 am, edited 2 times in total.

User avatar
DougieLawson
Posts: 36316
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Raspberry Pi 2 Model B password not workingy

Tue Sep 27, 2016 9:46 pm

There's no point posting with the private address blocks (10.0.0.0/8, 172.[16-31].0.0/16 or 192.168.0.0/24) or the IPv4 link local addreses (169.254.0.0/16) obfuscated, it just makes your posting into unreadable nonsense. If I can get close enough to your private LAN to see those addresses then your network is already compromised.

Not publishing those addresses on a public forum does nothing useful and makes it impossible for folks to help with your networking issues.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

BigJ
Posts: 3
Joined: Tue Sep 27, 2016 4:48 am

Re: Raspberry Pi 2 Model B password not workingy

Tue Sep 27, 2016 10:02 pm

Thank You DougieLawson for the comments. I didn't know about the possibility of getting compromised even by giving a partial part of the IP address.

Thanks again.

Graymalk
Posts: 55
Joined: Wed Nov 11, 2015 8:33 pm

Re: Raspberry Pi 2 Model B password not workingy

Tue Sep 27, 2016 10:17 pm

I've been a Mac user since the Classic and i have no idea what you did :lol:

My advice to Mac users:
Just plug the Pi into your router, give it an IP address in the router, open a terminal window on the Mac, and ssh [email protected] Don't forget to secure the Mac's ssh settings as they default to something pretty open.

User avatar
davidcoton
Posts: 4195
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: Raspberry Pi 2 Model B password not workingy

Tue Sep 27, 2016 10:31 pm

DougieLawson wrote: 192.168.0.0/16
FTFY
Signature retired

User avatar
DougieLawson
Posts: 36316
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Raspberry Pi 2 Model B password not workingy

Tue Sep 27, 2016 10:32 pm

BigJ wrote:Thank You DougieLawson for the comments. I didn't know about the possibility of getting compromised even by giving a partial part of the IP address.

Thanks again.
You've now made it 100% impossible to help. If your RPi is at 192.168.3.14 then tell us it's at 192.168.3.14 don't hide the details because 99.9% of the folks who are willing to help will instantly ignore you post.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
DougieLawson
Posts: 36316
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Raspberry Pi 2 Model B password not workingy

Tue Sep 27, 2016 10:35 pm

davidcoton wrote:
DougieLawson wrote: 192.168.0.0/16
FTFY
Wrong. Here's the evidence (connected by IPv6 so I can muck about with my IPv4 address without losing my connection).

Code: Select all

[email protected]:~# ifconfig wlan0 0.0.0.0
[email protected]:~# ifconfig wlan0
wlan0     Link encap:Ethernet  HWaddr b8:27:eb:d8:87:39
          inet6 addr: pppp:pppp:pppp:pppp:ba27:ebff:fed8:8739/64 Scope:Global
          inet6 addr: fe80::ba27:ebff:fed8:8739/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:289429 errors:0 dropped:113615 overruns:0 frame:0
          TX packets:132324 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:125313763 (119.5 MiB)  TX bytes:86576193 (82.5 MiB)

[email protected]:~# ifconfig wlan0 192.168.3.14
[email protected]:~# ifconfig wlan0
wlan0     Link encap:Ethernet  HWaddr b8:27:eb:d8:87:39
          inet addr:192.168.3.14  Bcast:192.168.3.255  Mask:255.255.255.0
          inet6 addr: pppp:pppp:pppp:pppp:ba27:ebff:fed8:8739/64 Scope:Global
          inet6 addr: fe80::ba27:ebff:fed8:8739/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:289552 errors:0 dropped:113635 overruns:0 frame:0
          TX packets:132392 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:125329361 (119.5 MiB)  TX bytes:86589005 (82.5 MiB)

[email protected]:~#
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
davidcoton
Posts: 4195
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: Raspberry Pi 2 Model B password not workingy

Tue Sep 27, 2016 10:39 pm

I don't claim to understand your output. But
RFC1918 wrote: The Internet Assigned Numbers Authority (IANA) has reserved the
following three blocks of the IP address space for private internets:

10.0.0.0 - 10.255.255.255 (10/8 prefix)
172.16.0.0 - 172.31.255.255 (172.16/12 prefix)
192.168.0.0 - 192.168.255.255 (192.168/16 prefix)

We will refer to the first block as "24-bit block", the second as
"20-bit block", and to the third as "16-bit" block. Note that (in
pre-CIDR notation) the first block is nothing but a single class A
network number, while the second block is a set of 16 contiguous
class B network numbers, and third block is a set of 256 contiguous
class C network numbers.
After further thought:
The mask for the size of the reserved blocks are /8, /12, and /16.
However, in use each network will be of class A, B, or C respectively, so the correct mask for a particular network is /8, /16, or /24 respectively.
So if you want to define the pattern for a network within the class C block, it would be 192.168.n.0/24.
The pattern for a network within the class B block is 172.n.0.0/16, where 16<=n<32.
And for completeness, the only network in the class A block is 10.0.0.0/8.
Last edited by davidcoton on Tue Sep 27, 2016 11:11 pm, edited 1 time in total.
Signature retired

User avatar
DougieLawson
Posts: 36316
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Raspberry Pi 2 Model B password not workingy

Tue Sep 27, 2016 11:05 pm

The default netmask is 255.255.255.0 for 192.168.xxx.yyy that's /24 in CIDR format. The available range runs from 192.168.0.0 to 192.168.255.255 but that's sub divided into 256 subnets. So you can't bridge a 192.168.1.xxx network to 192.168.2.xxx, you have to use a router for that as they are discrete subnets.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
davidcoton
Posts: 4195
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: Raspberry Pi 2 Model B password not workingy

Tue Sep 27, 2016 11:22 pm

Agreed. The /n notation is used for two different purposes:
1) prefix size when defining a block of addresses, possibly containing multiple subnets (and used only this way in in RFC1918, unless I missed it)
2) the netmask for a subnet.

I assume it is possible to define a class B subnet 192.168.0.0/16, by overriding the default mask. Not necessarily a clever thing to do. But at that point I'm guessing, I haven't tried it.
Signature retired

User avatar
DougieLawson
Posts: 36316
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Raspberry Pi 2 Model B password not workingy

Tue Sep 27, 2016 11:31 pm

Technically any network can be subnetted with any mask. But it doesn't work sensibly unless you own the whole network block.

Narrowing the subnet is more sane than widening it. So 192.168.1.0/25 makes sense (usable addresses are reduced to 192.168.1.1 to 192.168.1.126) where 192.168.1.0/23 will cause problems because your address range (192.168.0.1 to 192.168.1.254) overlaps the 192.168.0.0/24 block.

IP Addr/Mask: 192.168.1.0/25
Base IP Addr: 192.168.1.0
NetMask: 255.255.255.128
Broadcast Addr: 192.168.1.127
Hostmask: 0.0.0.127
Bits: 25
Size: 128
Maxblock: 24
Next Base IP Addr: 192.168.1.128


IP Addr/Mask: 192.168.0.0/23
Base IP Addr: 192.168.0.0
NetMask: 255.255.254.0
Broadcast Addr: 192.168.1.255
Hostmask: 0.0.1.255
Bits: 23
Size: 512
Maxblock: 13
Next Base IP Addr: 192.168.2.0
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
rpdom
Posts: 15408
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Raspberry Pi 2 Model B password not workingy

Wed Sep 28, 2016 4:47 am

davidcoton wrote:
DougieLawson wrote: 192.168.0.0/16
FTFY
Really, that should have been 192.168.[0-255].0/24

Another address range to add to the "don't bother to hide it because it won't affect your security" is 127.0.0.0/8

Return to “General discussion”