I have a serious problem as everything of my project is on my sd card and I can't connect to the raspberry pi as I have been doing for the last 2 months I am using raspbian connection SSH using PuTTy and Xming

1) I was trying to install a new package on the pi and then error no enough space (memory).I closed the connection then.

2) the day after I tried to connect I typed the user name and password as usual then typing lxsession this error appeared.

PuTTY X11 proxy: wrong authorisation protocol attempted

after googling the error it appears it is because of the law memory. I tried to see how to delete some file from the putty command window I found this command sudo rm -rf /usr/share/doc/* /opt/vc/src/hello_pi/hello_video/test.h264 /home/pi/python_games I typed it and it worked without errors but same Xming problem was there

3) I plugged in the sd card in the laptop...I tried to copy the data on the sd card just ctrl+ A > ctrl+c just in case I can put them on a bigger sd card (can't do that OS should br burnt on the SD card)

4) Now I am trying to open the SSH connection PuTTy but Network error : connection refused Dont know what happened or how can I fix it all my work is on it ANY HELLLLP, PLease??!

  • You can mount the SD card on any Linux machine, and just copy what you need. You could even do it in Windows with an ext2/3 fuse if you really wanted to, but its safer on a Linux machine. Just use a live CD/USB or something.
    – Piotr Kula
    Commented Feb 15, 2016 at 9:04

1 Answer 1


You could try using Win32DiskImager to read off the data, then write it back to a larger SD card. I've never tried writing back to a larger card though - it may not recognise that the extra space is available - but worth a try.

In future, it's also a really simple way to make a complete backup (which I've wished I had done on a few occasions). Just power off the Pi, switch the SD card over to your laptop, read the data into a backup folder using Win32DiskImager, then return the SD card to your Pi.

  • That wont sort the problem, as the partition needs to be expanded. You could try and edit your answer and include how to do that. That should then technically solve the space problem
    – Piotr Kula
    Commented Feb 15, 2016 at 9:05
  • I would if I knew how off the top of my head, or had time to look into it. Feel free to edit (or answer yourself) though.
    – Jamie Bull
    Commented Feb 15, 2016 at 10:48

Your Answer

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

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