How to copy files to remote server using rsync

Green

New Member
Joined
Jun 4, 2023
Messages
2
Reaction score
1
Credits
24
Hello,

I am on windows machine with WSL. I like to copy some files to shared hosting remote server using rsync. I get the below error when I attempt to do it:

$ rsync -ahP src [email protected] public_html/test
Unable to negotiate with xx.xx.xxx.xxx port 22: no matching host key type found. Their offer: ssh-rsa,[email protected],ssh-dss,[email protected]
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(228) [sender=3.2.3]

Launched Putty
Connected to the remote server where user name was cpanel user name.

I have two folders: src and dest in this directory
C:\...\mysite\rsync

Launched command prompt
Typed: wsl
CDed to this directory C:\...\mysite\rsync
Typed: rsync -ahP src [email protected] public_html/test

I expected the src folder to be copy over to public_html/test directory but I get the above error and nothing was transferred to the target directory. How can I transfer file from local windows machine to remote server?
 
Last edited:


Hmm... I tried editing your post to make the emoticons disappear by toggling 'bbcode'.

As you can see, I had no success in doing so. I do not know why.
 
For some reason, it would not allow me to do so. I dunno why, but thanks for doing so - as it'll make it easier for people to understand and help you diagnose the problem.

This is outside of my wheelhouse and the only thing I can guess is that it might have something to do with not having a full path. Maybe /home/public_html/test or whatever the complete path is. Then again, when you log in with that user it might already have you situated in the /home directory.

We have users scattered across the globe so be patient and someone may be along to help you.

I'm a simple man. I use SFTP.
 

Members online


Latest posts

Top