0

I set up a model A RPi to boot up with wlan0 and have a static IP address like so:

In /etc/network/interfaces:

auto lo

iface lo inet loopback
iface eth0 inet dhcp

auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

iface wlan0 inet static
address 192.168.0.1xx
gateway 192.168.0.xx
netmask 255.255.255.0

iface default inet dhcp

In /etc/wpa_supplicant/wpa_supplicant.conf:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
  ssid="xxxxx"
  psk="xxxxx"
  proto=RSN
  key_mgmt=WPA-PSK
  pairwise=CCMP TKIP
  group=CCMP TKIP
}

This being a model A, I can't plug in the USB keyboard and the USB wifi dongle at the same time. My strategy is to sudo reboot, remove the keyboard USB, and replace it with the wifi dongle. When the RPi boots up, I can see on the screen that it recognizes the wifi dongle and assigns the RPi the static IP I chose.

I then go to my Windows laptop, open up cmd, and ping the RPi static IP address. Success! However, when I open up PUTTY and try to SSH into the RPi at that IP address on Port 22, I get the dreaded "Connection refused" error.

Things I've tried to get rid of "Connection refused":

  • Disabling/re-enabling SSH in raspi-config and rebooting (didn't change anything)
  • SSH-ing into the RPi's localhost ssh 127.0.0.1 (successful)
  • Checking RPi's /etc/ssh/sshd_config to make sure it's listening on Port 22 (it is)
  • Disabling Windows Firewall entirely (didn't work)
  • Changing the RPi's static IP (to another .1xx) to make sure it's not overlapping with another one on the network

I'm a bit lost at this point. It'd really make this project easier if I could type on the RPi and connect to the internet at the same time :P Any other ideas?

  • no error log, no error message. The sshd server usually provides information why it did refused the connection. – Jakuje Nov 11 '15 at 17:39
  • 1
    try the vnc server if it works until you fix the ssh, you wont need a keyboard attached to pi then. – tejas Nov 11 '15 at 19:11

Your Answer

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

Browse other questions tagged or ask your own question.