0

So, this is my setup: I have computer A and a computer B, both with Ubuntu 20.01. Each computer has openssh-server working just fine. Yesterday, I used rsync to copy a large file from A to B, and it didn't seem to have any issue (it was the first time rsync was used). Today, I tried to connect via SSH from B to A and I had a "No route to host" error. Then I tried to connect via SSH from A to B and "No route to host" happened again. Then, on each computer I did a: ssh [email protected] and none gave me any issue. Then, I did a: ssh -T [email protected] on both computers and both were successful. Then, I did an: nmap -Pn -p22 192.168.xx.yy on both computers trying to connect to the other, the results are:

                               PORT   STATE    SERVICE
nmap tested in A with IP of A: 22/tcp filtered ssh
nmap tested in A with IP of B: 22/tcp open     ssh
nmap tested in B with IP of A: 22/tcp filtered ssh
nmap tested in B with IP of B: 22/tcp open     ssh

What really bugs me out is that yesterday, before using rsync, the ssh connection was working just fine. The file was copied successfully, and both computers have been restarted since, so I don't know if there's some file that was corrupted or something like that. I'm not even sure if the rsync is what caused the issue. Just to be sure, in computer A, I did a:

sudo lsof -i -P -n | grep 192.168

And the only IP address that I see is the one from A. Not sure if this might help, but I only used one rsync command, and is the one that follows:

rsync -rvz -e 'ssh -p XXXX' --progress /PATH/TO/SOURCE/FILE [email protected]:/PATH/TO/DESTINATION/FILE

EDIT: I don't think the path is the issue, since I ran rsync from a dicerctory in /home/user, but for disclosure, the actual rsnc command was:

rsync -rvz -e 'ssh -p 2222' --progress ./someDB.sql  [email protected]:/home/user/DBs

And as for the absolute path of where I ran the command, it was:

/home/user/DB/
2
  • Recall that rsync is one way; i.e. it has a source, and a destination. It seems what you may have done is copy some config file (something from /etc) to your destination.
    – Seamus
    Commented Jan 12, 2021 at 22:20
  • It may be worth disclosing what the path/to/source/file and /path/to/destination/file is - if those involved system files/directories. If not, then it shouldn't matter and there's no reason to update your post. But, if they were, then I'd disclose what those directories/files were.
    – KGIII
    Commented Jan 12, 2021 at 23:03

1 Answer 1

0

Recall that rsync is one way; i.e. it has a source, and a destination. It seems what you may have done is copy some config file from your source computer (something from /etc) to your destination computer.

I won't even try to guess what those might be as you've covered up the actual options used in the rsync command, but a guess is something to do with network config (duh!)

This won't help you now, but in my experience, the most useful option in the entire rsync repertoire is --dry-run. It's effectively a "do-over".

2
  • Thank you, I'll take it into consideration for next time, meanwhile I don't know how can I ssh again.
    – DanielUPPA
    Commented Jan 14, 2021 at 14:14
  • @DanielUPPA: If you don't have a backup, then your easiest CoA may be re-installing.
    – Seamus
    Commented Jan 14, 2021 at 17:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .