LinuxQuestions.org
Help answer threads with 0 replies.
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-10-2019, 04:19 AM   #1
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Rep: Reputation: 73
set firewall and allow access for ssh, rsync to copy files to another laptop


I am trying to copy files from this laptop to another laptop on my local network. I am using my wireless connection.

On the receiving end, I installed ufw, ran this:



Quote:
sudo ufw allow 22/tcp

sudo ufw enable
Quote:
sudo ufw status shows

22/tcp ALLOW IN Anywhere
22/tcp (v6) ALLOW IN Anywhere
But I am getting this:

Quote:
pedro@pedro-newssd:~$ rsync -av -e "ssh" --progress /home/pedro/backgrounds/ pedro@192.168.1.4:/home/pedro/
ssh: connect to host 192.168.1.4 port 22: Connection refused
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:~$
I also tried, without success:
Quote:
sudo ufw allow from 192.168.0.0/16
Any tips please?

This laptop, at the moment, has the local ip 192.168.1.3
I am trying to copy files to 192.168.1.4

I can ping the other laptop:

Quote:
pedro@pedro-newssd:~$ ping -c 5 192.168.1.4
PING 192.168.1.4 (192.168.1.4) 56(84) bytes of data.
64 bytes from 192.168.1.4: icmp_seq=1 ttl=64 time=14.9 ms
64 bytes from 192.168.1.4: icmp_seq=2 ttl=64 time=8.72 ms
64 bytes from 192.168.1.4: icmp_seq=3 ttl=64 time=6.55 ms
64 bytes from 192.168.1.4: icmp_seq=4 ttl=64 time=7.15 ms
64 bytes from 192.168.1.4: icmp_seq=5 ttl=64 time=10.2 ms

--- 192.168.1.4 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4007ms
rtt min/avg/max/mdev = 6.552/9.528/14.996/3.018 ms
pedro@pedro-newssd:~$

Last edited by Pedroski; 11-10-2019 at 04:56 AM.
 
Old 11-10-2019, 05:55 AM   #2
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,367

Rep: Reputation: 2747Reputation: 2747Reputation: 2747Reputation: 2747Reputation: 2747Reputation: 2747Reputation: 2747Reputation: 2747Reputation: 2747Reputation: 2747Reputation: 2747
Quote:
ssh: connect to host 192.168.1.4 port 22: Connection refused
Your ssh connection is failing. Is the sshd service running on 192.168.1.4?
The output of 'ssh -v pedro@192.168.1.4' may be informative. (You can use -vvv for further output).

Also, why bother with SSH in a local LAN? Do you not trust yourself?
 
Old 11-10-2019, 06:10 AM   #3
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by allend View Post
Also, why bother with SSH in a local LAN? Do you not trust yourself?
Reasons for using SSH:
  • Curiosity: To explore this technology
  • Convenience: Secure access without password, using keys or certificates
  • Paranoia: What if somebody breaks into my network
  • Convenience: It's ubiquitous and just works
  • Laziness: I don't want to configure an rsync daemon (yes, it's probably done automatically when installing the OS, but it's yet another config that can break)
  • Why not?

The error message indicates that the firewall lets the connection request come in, but there is nothing to connect to. I.e. as allend says, sshd is probably not running.
 
1 members found this post helpful.
Old 11-10-2019, 07:14 AM   #4
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Original Poster
Rep: Reputation: 73
Well, I don't know what I'm doing really, not a computer man. I can use rsync and ssh to connect to my webpage and collect students' homework, so I thought I needed ssh.

Can I just use rsync? I believe, rsync will, by default, call ssh.

Are you saying, I need to have ssh running on the receiving laptop?
 
Old 11-10-2019, 07:27 AM   #5
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Original Poster
Rep: Reputation: 73
Got it!

I did not have ssh server installed on the receiving computer.

Quote:
sudo apt install --assume-yes openssh-server
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Rsync over ssh but not allow terminal access xmrkite Linux - Software 3 02-14-2014 10:20 AM
Want to change how pasted files are named "(copy)," "(another copy)," "(3rd copy)" L a r r y Linux - Desktop 3 08-24-2013 03:39 PM
How to set up ssh to allow users to ssh into the machine mrotsliah Linux - Server 14 06-03-2009 12:00 PM
SSH access problems: Can only allow users SSH access by adding to root group dhupke Slackware 10 12-21-2008 09:48 AM
Is there a way to allow a user to rsync files to my server without being able to SSH abefroman Linux - Security 1 12-08-2007 06:42 PM

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

All times are GMT -5. The time now is 04:01 AM.

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