Can't Putty from Windows into Raspberry Pi

Discussion in 'Computers, Hardware, and Operating Systems' started by KD8YQX, Dec 29, 2019.

ad: L-HROutlet
ad: l-rl
ad: Left-2
ad: Left-3
ad: Subscribe
ad: L-MFJ
ad: MessiPaoloni-1
  1. KD8YQX

    KD8YQX Ham Member QRZ Page

    I'm at a loss....been working on this for literally hours and cannot make any headway. I continue to receive the following message: Network Error: Connection Refused

    What I'm trying to do: use my raspberry pi 2 remotely so that I can have it doing things without needing a dedicated screen/mouse/keyboard

    I know that SSH needs to be enabled on the Pi. I know that there a few ways to do this (terminal commands, SSH text file with no extension in the boot directory, enabling it via the Pi GUI) and I have tried all of the them.

    I have allowed port 22 to be open on my windows machine as well as on my ATT router.

    I know for a fact that I am using the correct IP for the raspberry pi. I have even verified as to whether or not it has changed when rebooting the Pi.

    On windows I can successfully use DOS CMD to ping the pi's IP and I can run a successful tracert command as well.

    Within the putty options, I have tried enabling 'X11 forwarding'. I have no idea what this is-but I saw it in a video on youtube and gave it a shot.

    I have rebooted the Pi, the windows machine and the router as appropriate when system changes have been made.

    I have scoured the entire internet and have only found instances in which the above setting were the problem. To make certain that I'm not missing anything I've had another person take a look as well to make sure I wasn't overlooking something simple. We both agree that the above has been done correctly.

    Any thoughts?
     
  2. KA9JLM

    KA9JLM Ham Member QRZ Page

    What Image are you running on your RPi ?

    Some images setup SSH port to Port 222 by default.

    Another thing to check is the SSH Version.

    upload_2019-12-29_8-3-6.png

    Good Luck.
     
  3. PA0WV

    PA0WV Ham Member QRZ Page

    Ping ok, you have connection.

    PuTTY is only for command line connection.

    You need putty client on your windows.

    What you need is VNC viewer on your windows machine. You can download it for free.
    It gives you a windows environment of the Rpi on your windows machine. You can start multiple command line windows when you like each with a separate window,
     
  4. KV6O

    KV6O Ham Member QRZ Page

    Remotely, as in from the Internet? Or across your house (on the same network)?

    Start simple (if you're not already there), with the Pi and the Windows machine on the same network. The router should not play into this.

    The "connection refused" might indicate that SSH is not enabled on the Pi

    https://itsfoss.com/ssh-into-raspberry/
     
  5. KA9JLM

    KA9JLM Ham Member QRZ Page

    A easy test using CMD on your windows box is ;

    nmap x.x.x.x

    x.x.x.x = IP address of RPi

    That will display the open ports on your RPi


    upload_2019-12-30_7-51-4.png
     
  6. KD8YQX

    KD8YQX Ham Member QRZ Page

    Thanks for the suggestions. I checked my port and it was defaulted to 22. I went ahead and changed everything over to 222 for the heck of it and still nothing.
     
  7. KD8YQX

    KD8YQX Ham Member QRZ Page

    Thanks for the info. To clarify I am trying withing my home network. Just to test it out I also went over to another person's house a tried via their network (pi and laptop both on their network) and was still unable to access it.
     
  8. KD8YQX

    KD8YQX Ham Member QRZ Page

    I tried the nmap on my laptop and it is not a recognized command. I took both my laptop and Pi over to my parents yesterday to troubleshoot with my Dad. He was a unix system admin for several years so his knowledge of various linux commands was helpful. For instance, he suggested that I run SSH command from DOS. He was on his work laptop, which I assume is probably Pro version of windows whereas mine is a version for personal use. That's probably why he could start SSH via DOS and I could not, and also why I probably cannot use nmap on mine either.
     
  9. KD8YQX

    KD8YQX Ham Member QRZ Page

    Thanks for all for the suggestions. As mentioned in a previous comment, my father was helping me to troubleshoot the issue yesterday. He was a unix system admin for several years. He and I did some digging on the Pi and it appears as if the SSH is not running properly on the Pi. It is indeed starting, but then it stops and starts again but remains in an error state. We are not sure why it does this. We looked into some of the logs via the terminal window and this was about as far as we could get.

    At this point I'm thinking that it may be possible that there is some corruption with my Raspbian. I haven't really done much with the Pi as of yet (had it for a few years and just got around to messing with it recently) so I wouldn't be losing anything of real value.

    I suppose at this point trying to solve it would be more for the personal vindication than anything!
     
  10. KF5FEI

    KF5FEI Ham Member QRZ Page

    Never really had an issue with SSHing into a Pi, other than a security certificate or similar warning the first time you connect. If you monkeyed with any of the config files, you might have disabled something. I would re-image the SD card with the latest non-Beta version of Raspian and run through the install again. Once you do the install, check for and install updates - plenty of info on this via Google.

    If you don't have a display and keyboard hooked up to the Pi, you can do a network scan to find it's IP address. Zenmap is a good tool for Windows. It will let you scan your network and give you a list of devices, their MAC addresses, and what ports are open.
     

Share This Page