Article 4V742 [SOLVED] ssh will not connect

[SOLVED] ssh will not connect

by
Pedroski
from LinuxQuestions.org on (#4V742)
EDIT: SORRY! I was connected to 2 different routers, only just realized! Works now!

Hi, last week I managed to back up files with rsync via ssh. Today, the connection times out.

I am trying to send files from a laptop I use every day to this laptop as a backup.

Quote:
rsync -av -e "ssh" --progress /home/pedro/winter2019-20 pedro@192.168.1.4
this is from ifconfig on the receiving laptop:

Quote:
wlp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.4 netmask 255.255.255.0 broadcast 192.168.1.255

I can ping 192.168.1.4 from the sender laptop.

ufw on the receiver is like this:

Quote:
pedro@pedro-cheap:~$ sudo ufw status
Status: active

To Action From
-- ------ ----
22/tcp ALLOW Anywhere
Anywhere ALLOW 192.168.0.0/16
22/tcp (v6) ALLOW Anywhere (v6)
The sender laptop has local ip 192.168.1.9

On the receiving laptop, ssh server is active:

Quote:
pedro@pedro-cheap:~$ sudo service ssh status
[sudo] password for pedro:
a- ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2019-11-16 10:14:20 CST; 39min ago
Process: 1323 ExecReload=/bin/kill -HUP $MAINPID (code=exited, status=0/SUCCESS)
Process: 1319 ExecReload=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
Process: 891 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
Main PID: 926 (sshd)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/ssh.service
a""a"926 /usr/sbin/sshd -D

11ae 16 10:14:28 pedro-cheap systemd[1]: Reloading OpenBSD Secure Shell server.
11ae 16 10:14:28 pedro-cheap sshd[926]: Received SIGHUP; restarting.
11ae 16 10:14:28 pedro-cheap systemd[1]: Reloaded OpenBSD Secure Shell server.
11ae 16 10:14:28 pedro-cheap sshd[926]: Server listening on 0.0.0.0 port 22.
11ae 16 10:14:28 pedro-cheap sshd[926]: Server listening on :: port 22.
11ae 16 10:14:28 pedro-cheap systemd[1]: Reloading OpenBSD Secure Shell server.
11ae 16 10:14:28 pedro-cheap sshd[926]: Received SIGHUP; restarting.
11ae 16 10:14:28 pedro-cheap systemd[1]: Reloaded OpenBSD Secure Shell server.
11ae 16 10:14:28 pedro-cheap sshd[926]: Server listening on 0.0.0.0 port 22.
11ae 16 10:14:28 pedro-cheap sshd[926]: Server listening on :: port 22.
Last week, after connecting, I was asked for my user PW on the receiving laptop, then the files were sent.

This is the error I get on the sender laptop:

Quote:
pedro@pedro-newssd:~$ rsync -av -e "ssh" --progress /home/pedro/winter2019-20 pedro@192.168.1.4:/home/pedro/
ssh: connect to host 192.168.1.4 port 22: Connection timed out
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(235) [sender=3.1.2]
pedro@pedro-newssd:~$ ssh pedro@192.168.1.4
ssh: connect to host 192.168.1.4 port 22: Connection timed out

Any tips about what might be wrong?

I just tried:

Quote:
sudo ufw allow from 192.168.1.0/24
Got "Rule added"

I used rsync and ssh to get homework files from my webpage this morning, no problems.

Why won't this work on my local network? Last week it worked!latest?d=yIl2AUoC8zA latest?i=8rbfTS1GuFM:uV4SKkPASsA:F7zBnMy latest?i=8rbfTS1GuFM:uV4SKkPASsA:V_sGLiP latest?d=qj6IDK7rITs latest?i=8rbfTS1GuFM:uV4SKkPASsA:gIN9vFw8rbfTS1GuFM
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments