Linux computer OpenSUSE 15.3 is client user mi address 192.168.0.6
Raspberry pi Rasbian is host user pi address 192.168.0.26
Connected via wifi
on linux:
ssh mi@192.168.0.26
it works I get a console on the Rpi computer.
Now I give the command
scp /home/pi/file mi@192.168.0.6:/home/mi
I get
ssh: connect to host 192.168.0.6 port 22: Connection refused
With Yast I inactivated the firewall. That did not work
The external,home etc zone’s all contain the ssh service
Any suggestions? Thanks for your attention
OpenSSH_8.4p1 Raspbian-5+deb11u1, OpenSSL 1.1.1n 15 Mar 2022
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to 192.168.0.6 [192.168.0.6] port 22.
debug1: connect to address 192.168.0.6 port 22: Connection refused
ssh: connect to host 192.168.0.6 port 22: Connection refused
lost connection
Yes on the linux machine(192.168.0.6 sshd is also running
I have the impression that the scp connection is refused by the linux machine
That is why I inactivated the firewall Did not help
The Rpi is at the moment not connected to Keyboard mouse Screen
I go to the Rpi console via ssh.
In the console I give the command:
middlecope@framboos:~ $ ssh 192.168.0.6
ssh: connect to host 192.168.0.6 port 22: Connection refused
Same problem:
ssh -v mi@192.168.0.6
OpenSSH_8.4p1 Raspbian-5+deb11u1, OpenSSL 1.1.1n 15 Mar 2022
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to 192.168.0.6 [192.168.0.6] port 22.
debug1: connect to address 192.168.0.6 port 22: Connection refused
Have you disabled password authentification in sshd.conf?
Have you created User mi on the System?
Have you send the key from the System you want to connect to 192.168.0.6?
I use ssh-keygen
to generate a key and ssh-copy-id
to copy it to the Server.
None of these will result in “Connection refused”. “Connection refused” means that either sshd is not active (on default port) or firewall blocks this port on host 192.168.0.6.
@karlmistelberger
Here are the result for the linux computer:
Do you see anything strange?
By the way teunis username thuis name of linux computer
teunis@thuis:~> systemctl status sshd.service
● sshd.service - OpenSSH Daemon
Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: disa>
Active: active (running) since Wed 2023-04-12 08:16:19 AST; 2h 19min ago
Process: 1578 ExecStartPre=/usr/sbin/sshd-gen-keys-start (code=exited, status=0/SUC>
Process: 1620 ExecStartPre=/usr/sbin/sshd -t $SSHD_OPTS (code=exited, status=0/SUCC>
Main PID: 1640 (sshd)
Tasks: 1
CGroup: /system.slice/sshd.service
└─1640 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups
teunis@thuis:~> sudo journalctl -b -u sshd.service
[sudo] password for root:
-- Logs begin at Wed 2023-04-12 04:15:36 AST, end at Wed 2023-04-12 10:38:25 AST. --
Apr 12 08:16:19 thuis systemd[1]: Starting OpenSSH Daemon...
Apr 12 08:16:19 thuis sshd-gen-keys-start[1578]: Checking for missing server keys in /e>
Apr 12 08:16:19 thuis sshd[1640]: Server listening on 0.0.0.0 port 22.
Apr 12 08:16:19 thuis sshd[1640]: Server listening on :: port 22.
Apr 12 08:16:19 thuis systemd[1]: Started OpenSSH Daemon.
3400G:~ # ssh notebook journalctl -b -u sshd.service
Apr 12 16:34:19 notebook systemd[1]: Starting OpenSSH Daemon...
Apr 12 16:34:19 notebook sshd-gen-keys-start[1050]: Checking for missing server keys in /etc/ssh
Apr 12 16:34:19 notebook sshd[1180]: Server listening on 0.0.0.0 port 22.
Apr 12 16:34:19 notebook sshd[1180]: Server listening on :: port 22.
Apr 12 16:34:19 notebook systemd[1]: Started OpenSSH Daemon.
Apr 12 16:59:22 notebook sshd[3735]: Accepted publickey for root from 10.0.0.2 port 49610 ssh2: RSA SHA256:jioLatt1LEaQeir3UJ72Da6qBRTPhpCP8UcfFAjEGVM
Apr 12 17:02:39 notebook sshd[3735]: Received disconnect from 10.0.0.2 port 49610:11: disconnected by user
Apr 12 17:02:39 notebook sshd[3735]: Disconnected from user root 10.0.0.2 port 49610
Apr 12 17:02:54 notebook sshd[3806]: Accepted publickey for root from 10.0.0.2 port 53396 ssh2: RSA SHA256:jioLatt1LEaQeir3UJ72Da6qBRTPhpCP8UcfFAjEGVM
Apr 12 17:02:54 notebook sshd[3806]: Received disconnect from 10.0.0.2 port 53396:11: disconnected by user
Apr 12 17:02:54 notebook sshd[3806]: Disconnected from user root 10.0.0.2 port 53396
Apr 12 17:04:28 notebook sshd[3835]: Accepted publickey for root from 10.0.0.2 port 58670 ssh2: RSA SHA256:jioLatt1LEaQeir3UJ72Da6qBRTPhpCP8UcfFAjEGVM
3400G:~ #