Page 1 of 1

Getting SSH working at new install

Posted: Fri Jan 27, 2017 7:36 pm
by rp108
I have a RPi 2.
I have created boot image on 8 gig card, Raspbian Jessie, 1-11-2017.

RPi boots fine and I can ping the Pi (192.168.0.104) from my Win7 machine.

I have used Putty many times in the past, so I believe that I know how to connect, but I cannot connect. I get:
Network Error: Connection refused.

I am guessing that the SSH Server is not running by default in the Jessie distro.

So I figured that I cannot access headless initially, and therefore have to connect KB and Mon.
I purchased a HDMI to VGA adapter so that I could do this with a VGA monitor that I have, but I do not get any video.

Any help is much appreciated.
Any product suggestions on a HDMI-to-VGA adapter that actually works would be great, or alternately, a cheap HDMI monitor that works, is much appreciated.

My goal is to operate the Pi headless with Putty and Windows Remote Desktop (with xrdp server running on Pi).

Thanks,
rp108

Re: Getting SSH working at new install

Posted: Fri Jan 27, 2017 9:12 pm
by mfa298
A change was made a few months back to improve security by not enabling ssh by default. You can probably find the details on the blog if you're interested.

With a keyboard and screen you can use raspi-config to enable ssh. For a fully headless setup you can create a file called ssh on the boot (small fat partition), If the pi sees that file during bootup it'll enable ssh for you.

Re: Getting SSH working at new install

Posted: Fri Jan 27, 2017 10:03 pm
by B.Goode
I am guessing that the SSH Server is not running by default in the Jessie distro
No guessing needed.

The Raspberry Pi blog, the Raspbian Release Notes, and discussion in these forums all confirm it.

With the most recent (Nov 2016) release of Raspbian SSH is no longer enabled by default.

https://www.raspberrypi.org/blog/a-secu ... ian-pixel/
http://downloads.raspberrypi.org/raspbi ... _notes.txt
viewtopic.php?f=66&t=166984

Re: Getting SSH working at new install

Posted: Sat Jan 28, 2017 7:25 pm
by rp108
Thank-you so much to all.
Have it working now.
The ability to add the SSH file to the boot partition within Windows, is a brilliant idea.
Thanks-again.

Re: Getting SSH working at new install

Posted: Thu May 11, 2017 12:55 pm
by Killertechno
Hi guys,
I'm using latest image for Pi Zero.

My router is configured as follows:
WAN = public IP
WLAN = 192.168.100.1/24 acting as DHCP server
NAT: TCP on port 5755 re-directed on port 22 of 192.168.100.212 (my Raspberry)

Raspberry Pi:
DHCP client using as gateway 192.168.100.1, DNS 8.8.8.8

I try to SSH on Raspberry from my laptop (192.168.100.211) connected to WLAN, all ok.
I try to SSH on Raspberry from outside, no answer from TCP requests on port 22 (I see this using wireshark), at same time on Pi I can see requests on port 22 from my laptop but no answers from Pi.

I add new NAT rule on my router: masquerade all outgoing packets from WLAN interface.
Now it correctly works.
It looks such SSH doesn't allow requests from different network, maybe some "strange" setting on SSH?
Thanks.

Re: Getting SSH working at new install

Posted: Fri May 26, 2017 4:17 pm
by robothunter
I had this problem using raspbian lite. After using Win32DiskImager to create my SD card I created a file called "SSH" with no extension on the card with notepad. Then I log into my router and check attached devices to find the assigned ip address. Then I use putty on my PC or the Terminal on my Mac to log in. Username is "pi" password is "raspberry". Next step is to run the "sudo raspi-config" command to set it up. You can officially turn on ssh under option 5 "Interfacing Options".

I hope that helps.