0

I am trying to troubleshoot a startup script. This necessitates multiple reboots and restarting ssh sessions. At seemingly random times the pi becomes ornery.

ssh -vvv 192.168.1.160 -p 22

OpenSSH_7.1p2, OpenSSL 1.0.1g 7 Apr 2014
debug1: Reading configuration data /etc/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to 192.168.1.160 [192.168.1.160] port 22.
debug1: connect to address 192.168.1.160 port 22: Connection refused
ssh: connect to host 192.168.1.160 port 22: Connection refused

the pi is alive and well

ping 192.168.1.160

Pinging 192.168.1.160 with 32 bytes of data:
Reply from 192.168.1.160: bytes=32 time=5ms TTL=64
Reply from 192.168.1.160: bytes=32 time=5ms TTL=64
Reply from 192.168.1.160: bytes=32 time=4ms TTL=64
Reply from 192.168.1.160: bytes=32 time=7ms TTL=64

It just doesnt want to ssh. When the hdmi cable is connected, the boot sequence looks fine. I have to shut it off by disconnecting the power and then restarting it - then the pi is ssh-able again. The pi is configured to connect to my local wifi with the appropriate credentials in wpa_supplicant.conf and the static ip in dhcpd.conf and it works well, most of the time.

1

ssh -vvv 192.168.1.160 -p 22 will attempt to connect to the Pi as whatever user is on whatever machine you are using to ssh - which almost certainly doesn't exist.

Try ssh pi@192.168.1.160

| improve this answer | |
  • was actually using moba term which stores the session info so it is sent the same way every time. hard shutoff of the pi fixes it so its not a typo issue. – aquagremlin May 11 '18 at 15:11
0

In /etc/ssh/sshd_config on your raspi you can set the LogLevel to one of QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3 for your ssh server (man sshd_config). I suggest to set it to one of the debug level, restart the ssh server and look at the logging files if you can find the reason why the connection is refused.

| improve this answer | |

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.