LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-15-2019, 09:03 PM   #1
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Rep: Reputation: 73
ssh will not connect


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:
● 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
└─926 /usr/sbin/sshd -D

11月 16 10:14:28 pedro-cheap systemd[1]: Reloading OpenBSD Secure Shell server.
11月 16 10:14:28 pedro-cheap sshd[926]: Received SIGHUP; restarting.
11月 16 10:14:28 pedro-cheap systemd[1]: Reloaded OpenBSD Secure Shell server.
11月 16 10:14:28 pedro-cheap sshd[926]: Server listening on 0.0.0.0 port 22.
11月 16 10:14:28 pedro-cheap sshd[926]: Server listening on :: port 22.
11月 16 10:14:28 pedro-cheap systemd[1]: Reloading OpenBSD Secure Shell server.
11月 16 10:14:28 pedro-cheap sshd[926]: Received SIGHUP; restarting.
11月 16 10:14:28 pedro-cheap systemd[1]: Reloaded OpenBSD Secure Shell server.
11月 16 10:14:28 pedro-cheap sshd[926]: Server listening on 0.0.0.0 port 22.
11月 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!

Last edited by Pedroski; 11-15-2019 at 09:14 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Allow SSH client to connect without username or ssh key NotionCommotion Linux - Security 7 08-12-2017 09:41 AM
Initiate ssh tunnel to connect to ssh? brianmcgee Linux - Security 2 09-07-2011 10:07 AM
Able to connect via SSH but not able to connect via web port 80 Orange Sunshine Linux - Server 9 04-03-2010 07:11 PM
iptables help! DROP ssh port, but allow to connect to ssh if from 2222 port kandzha Linux - Networking 4 09-13-2006 09:10 AM
ssh + pop3 with kmail: Could not connect to host localhost, but ok without ssh Emmanuel_uk Linux - Networking 0 07-20-2006 04:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration