2

I have a problem connecting my raspi 2 to my laptop monitor using SSH connection. my laptop OS is windows 7.

After I put the IP address of PI, the putty shows

fatal error:connection refused.

I have try multiple times but still the same.

my PI address is: 169.254.110.48

  • 1
    Can you ping the Pi? If yes try to launch Putty with the increased verbosity option -v: putty.exe -v – ripat Nov 22 '15 at 16:01
  • Your question is too broad. As others have pointed out this is a link-local address. I could guess what you have done, but if you describe the physical connection you may get an answer. – Milliways Nov 22 '15 at 23:54
  • You may be able to scan your network using NMap/Fing and see if you can find the Pi, otherwise it is also possible to get a serial connection to the Pi via the GPIO (and a adapter usually). Also, its worth checking whether there is a firewall anywhere on the computers/network that could block SSH – Wilf Nov 23 '15 at 0:15
1

What is determining the IP addresses that your PC and Pi are getting? That 196.254.x.x address range is a link-local as per RFC3927 one that Windows uses for Automatic Private IP Addressing which Apple calls Bonjour. However, as per the Wikipedia:

In IPv4 they are normally only used to assign IP addresses to network interfaces when no external, stateful mechanism of address configuration exists, such as the Dynamic Host Configuration Protocol (DHCP), or when another primary configuration method has failed. In IPv6, link-local addresses are mandatory and required for the internal functioning of various protocol components.

Given that you are able to reach here to the Stack Exchange site I would presume that you have a router that should be providing IPs, possibly in the 192.168.x.y range where x is often 0 or 1, and y is possibly 1 for the router and then goes upwards for other things connected on your LAN.

This error can be caused by IP address clashes, especially if some devices are set to fixed ones (for instance if they are a server/gateway and you want to fix where they are - like your broadband router) and your only dhcp server (normally, again, your router) has not been told to NOT use that fixed address as one for the DHCP pool. I'd suggest getting into your router's configuration and checking the range of addresses used for dhcp does not include any statically assigned ones configured locally on a device itself. Note that many routers do permit you to "reserve" a specific address for devices which you always want to have a fixed address for (e.g. I have one device used as an IPv6 tunnel gateway and local storage server which it is convenient to always be 192.168.1.2 next to the IPv4 router on 192.168.1.1) which is another way to have a fixed address AND for it to be handled by dhcp rather than by locally setting on the device itself.

Unlike the previous answer - which I don't have the reputation to comment on (yet) - I'd strongly urge you NOT to enable PermitRootLogin without-password UNLESS you have also sorted out a key to secure such logins. By default Pis running Raspbian do not have a root password set so if there is external access to your LAN the Pi will be very insecure - and once you sort out your IP issues so that it is reachable it will be vulnerable.

0

First in terminal on your pi type ip add it should return 192.254.110.48 if that is the pi's local ip addres if it is then type sudo apt-get install ssh. Next type sudo nano /etc/ssh/sshd_config and find the line that says PermitRootLogin without-password, it is normally 26 lines down, and change it to PermitRootLogin yes, CTRL-x, y enter and then type /etc/init.d/ssh restart and hit enter, next type ip add grab the ip go to your computer, open putty type in your ip address, make sure that the port is 22 and hit open. Hopefuly this helps you out.

  • Permitting root login not a good idea for security.... – Wilf Nov 23 '15 at 0:16
  • unless you use a crazzy password like i HATE my Children or i LOVE My Dog – Austinthemighty Nov 24 '15 at 2:09
  • Still word based - what about azZ6yfYnUKRwtZPEm? – Wilf Nov 24 '15 at 8:41
  • the thing is about your passwd is that we have trained computers so good to crack passwords now that they mainly look for lowercase and capital letters numbers and special characters – Austinthemighty Nov 25 '15 at 17:16
0

There is one way to solve this problem Raspberry Pi 3. In RPI 3 Default setting SSH Service is disabled so you want to start Thsi Service using terminal command:

sudo service ssh start

and it is need everytime whenever your raspberry boot up so you want to add this line in file :

/etc/rc.local

so, using vim editor you can add below line rc.local file

sudo service ssh start

-1

Must use sudo raspi-config to start ssh service. None of the 'headless' ssh methods worked. I had to connect a screen and monitor to start ssh services. Then all fine.

  • 1
    You are responding to an old post and you don't specify what are the "non of the ... methods". If you have a fresh Raspbian (Nov. 2016), you might check this method for headless setup. – techraf Jan 21 '17 at 4:22

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.