I am a newbie to the Raspberry Pi and as the title says, I was connected to my RPi through SSH protocol and the session suddenly was terminated due to a 'FlowSocketReader' error or something.

My LED is currently on and I am questioning how to turn it off properly. I can't apply the GPIO.cleanup() command here because it assumes that I don't have any channels set up yet.

GPIO(23, False) doesn't work either..

Does someone have a tip for me?


1 Answer 1


Assuming your SSH session is restored, otherwise reboot ...

On the standard terminal command line:

gpio -g mode 23 out
gpio -g write 23 0

From Python:

import RPi.GPIO as GPIO
  • Thank u. can u kindly provide link to resources that contain more information about gpio -g mode and gpio -g write commands?
    – Raghavan K
    Mar 4, 2022 at 8:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.