1

This is my first time using a pi, and first time using ssh, so please be patient and clear. Thanks for the help!

I am trying to run my pi headless, using my laptop's monitor and keybaord. I already have Raspian installed on a mini sd card, which is in the pi. The pi is powered on and connected via ethernet cable to my wireless router. I logged into the router and discovered the pi (which is labeled "recovery" for some reason) and its IP address.

I installed openssh-server on the laptop with which I'd like to control the pi, which currently runs Ubuntu 15.04:

sudo apt-get install openssh-server

I ran a few other commands I'd found related to using ssh for the purpose of pi:

systemctl enable sshd.service
systemctl start sshd.service

matt:~$ systemctl status sshd.service
● ssh.service - OpenBSD Secure Shell server
   Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2017-02-12 16:11:38 EST; 1min 27s ago
 Main PID: 9424 (sshd)
   CGroup: /system.slice/ssh.service
           └─9424 /usr/sbin/sshd -D

Feb 12 16:11:38 <MY COMPUTER> systemd[1]: Started OpenBSD Secure Shell server.
Feb 12 16:11:38 <MY COMPUTER> systemd[1]: Starting OpenBSD Secure Shell server...
Feb 12 16:11:38 <MY COMPUTER> sshd[9424]: Server listening on 0.0.0.0 port 22.
Feb 12 16:11:38 <MY COMPUTER> sshd[9424]: Server listening on :: port 22.

However when I try to open the pi using ssh, I get this:

matt:~$ ssh pi@<PI IP from router>
ssh: connect to host 192.168.1.4 port 22: Connection refused
1

1 Answer 1

1

When using SSH, the server is the device you're SSHing into - in this case the Raspberry Pi.

Installing the server on your laptop is not the fix here, instead you need to enable SSH on your Raspberry Pi (official RPi Guide) as this already has the server installed upon it. https://www.raspberrypi.org/documentation/remote-access/ssh/

Then your SSH x.x.x.x from the laptop will work - assuming Firewalls are off for example.

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.