파일을 변경할 때마다 수동으로 파일 동기화(항상 집 Wi-Fi에 연결되어 있는 데스크탑과 가지고 다니는 노트북 사이)

파일을 변경할 때마다 수동으로 파일 동기화(항상 집 Wi-Fi에 연결되어 있는 데스크탑과 가지고 다니는 노트북 사이)

이 작업을 수행하려면 inotifywatch 등을 사용해야 한다는 것을 알고 있습니다. 또한 rsync를 사용할 수 있다는 것도 알고 있습니다. 보안을 강화하려면 SSH를 통해 연결해야 한다는 것을 알고 있지만, 모르는 것이 있습니다. 어디서부터 시작해야 할까요?

다음과 같은 논리를 구현하고 싶습니다.

내 노트북에

if (any of the file in the watched folder (locally on my laptop) changes && the laptop is connected to my home wifi && my desktop is accessible through SSH) {
    run rsync and and some ssh command to access my desktop and update the folder on my desktop
}

내 데스크탑에

if (any of the file changes in the watched folder (locally on my desktop) and my laptop is accessible with SSH) {
    run rsync and and some ssh command to access my laptop and update the folder on my laptop
}

저는 KDE Neon을 사용하여 두 대의 컴퓨터를 설치하고 (거의) 동일한 설정을 갖고 있습니다.

관련 정보