1

Please could someone help me to undo this command, I tried for enabling ssh on the pi?:

sudo rm /etc/ssh/ssh_host_* && sudo dpkg-reconfigure openssh-server

I read that command on this page.

And even though I can see pi on my router's ip pool, it is not connecting to the internet or the ssh on my windows putty. It's connected to my lan network via ethernet. I've never used or known about ssh, and tried it only after buying the pi. I thought it would help in accessing the pi over wifi, since my wireless mouse+keyboard isn't compatible with the pi. I also bought a wifi adapter but since I've to connect both usb mouse and usb keyboard, there's not extra port to attach it.

EDIT: Pinging to the Raspberry Pi in command prompt displays as follows:

IP Address: Raspberry Pi : 192.168.1.5

IP Address: Win7 (my Laptop): 192.168.1.6

Pinging 192.168.1.5 with 32 bytes of data:
Reply from 192.168.1.6: Destination host unreachable.
Reply from 192.168.1.6: Destination host unreachable.
Reply from 192.168.1.6: Destination host unreachable.
Reply from 192.168.1.6: Destination host unreachable.

Ping statistics for 192.168.1.5:
Packets: Sent = 4, Received = 4, Lost = 0 <0% loss>.
  • Is your problem that you are unable to use Putty to SSH into your Pi? If yes, can you ping your Pi from your PC? What error or message do you receive when you attempt to connect via Putty to your Pi? – HeatfanJohn Oct 2 '13 at 12:05
  • The error I'm getting on Putty is : Network Error: Connection Timed Out ... I just pinged the raspberry pi, and have updated my question with the results of the ping.. – user2377276 Oct 2 '13 at 13:15
2

There are 2 commands splitted by && marks in your example. && means that second command will run if first command is successful.

First command will remove all files in /etc/ssh/ folder which begin with 'ssh_host_'. (* works as wildcard)

Second command will re-configure openssh-server program by Debian way. It will create new ssh_host files in /etc/ssh/ folder.

Those commands used for creating new fingerprints for ssh server. If your OS pre-installed you may want configure ssh-server because you don't want to trust OS maintainer guys :) Server ssh fingerprints are important for device security.

To enable SSH on boot please run 'raspi-config'. In menu you will find 'enable/disable SSH' option.

  • Thanks! I was worrying I had corrupted the ssh settings on the pi! – user2377276 Oct 2 '13 at 13:19
  • Hey! My problem is still not solved completely! How can I access the pi with ssh, when the Ethernet connection is not connecting to the internet? It's showing on the LAN router, but not accessible via putty... ? – user2377276 Oct 2 '13 at 17:34
  • First of all ensure that sshd running on Pi. Try that command without quotes, "netstat -tlnp |grep ssh" – gurcanozturk Oct 3 '13 at 6:57
-1

Im facing the same problem but only after I've upgraded from wheezy to jessie. I followed already your described steps above without success.

ssh process is started on rpi and listens on 0.0.0.0:22

Interesting fact: Ping/ssh from my Macbook to rpi doesn't work Ping/ssh from rpi to Macbook works

Also, I checked the iptables but there are no policies.

  • 1
    This would be better as a comment as it's not really answer to the question – recantha Apr 20 '15 at 13:05

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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