Cannot run rsync when pushing to linux server - linux

When I try to sync a directory with the following command
rsync -r ssh /path/to/file user#IP:/destination
I get the following error code
rsync: Failed to exec ssh: No such file or directory (2)
rsync error: error in IPC code (code 14) at pipe.c(84) [sender=3.0.7]
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(603) [sender=3.0.7]
First off I know there are tons of links out there with this exact same problem but none of them have been helpful for me. Quite a lot of them recommend installing openssh which I already have and works fine on its own. I don't use cygwin either, so many other posts weren't helpful. Also, I've tried many variants of the above command line.
Some details of my implementation are that my local laptop uses Windows 10, the server I am trying to push to uses Ubuntu 18.04. I can easily create an ssh link between the two and rsync works perfectly fine on both devices when they are just copying files locally.
I don't know where my rsync package comes from because it was already installed on my computer when I got it, but the executable is located here: C:\Windows\SysWOW64\Empirum\rsync.exe
and ssh is located here C:\Windows\System32\OpenSSH\ssh.exe
the openssh folder is in my path so I don't know why rsync would have trouble finding it. I've been banging my head on this problem for a while now so any help would be very appreciated

Related

How to use rsync for Windows on both ends?

I install rsync for Windows through git-bash. If the remote end is Linux, it works fine. However, it does not work if the remote end is Windows. I install rsync on the remote end and test working as well, but it seems somehow it cannot locate its counterpart on the remote end.
$ rsync file user#host:
'rsync' is not recognized as an internal or external command,
operable program or batch file.
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(228) [sender=3.2.3]
Note, ssh and scp between the two Windows work well.
I ran into the same problem recently, none of the methods described on the Internet satisfied my needs, so I came up with another one:
https://medium.com/#vitezslav.kot/two-way-file-synchronization-using-rsync-and-ssh-public-key-authentication-on-windows-c99323c7a308

Issue with Realtek 8811CU installation script

I'm new here, so apologies if this is the wrong forum, but I do need to debug this setup script so it seems appropriate enough.
I bought a USB WiFi chip on Amazon (the Ourlink AC600) which uses the Realtek 8811CU chipset and the installation script it comes with for Linux is giving me errors right off the bat.
I tried more or less to debug but I'm simply awful with shell scripts so I didn't make too much progress. Here's the output of running chmod +x install.sh && /install.sh:
##################################################
Realtek Wi-Fi driver Auto installation script
November, 21 2011 v1.1.0
##################################################
Decompress the driver source tar ball:
tar: Old option 'f' requires an argument.
Try 'tar --help' or 'tar --usage' for more information.
rtl8821CU_WiFi_linux_v5.2.5.1_22211.20170517_COEX20170310-1212.rar
./install.sh: line 25: cd:
rtl8821CU_WiFi_linux_v5.2.5.1_22211.20170517_COEX20170310-1212.rar: Not a
directory
Authentication requested [root] for make clean:
make: *** No rule to make target 'clean'. Stop.
Authentication requested [root] for make driver:
make: *** No targets specified and no makefile found. Stop.
##################################################
Compile make driver error: 2
Please check error Mesg
##################################################
After I figured it was trying to decompress an archive that wasn't there (as the only archive present is a .rar) I edited the script to search for rar files instead (by changing the variable to grep .rar instead of .tar.gz on line 18 and 23). I then changed the tar extraction command to "unrar e" as it was no longer trying to extract a tar ball. When I ran it I got this output. Pastebin as it's rather long.
And while I would go ahead and check the error message, the driver package includes no such references. Evidently next time I should buy from a name brand.
Here's pastebins of the contents of install.sh and the respective Makefile the script uses, as they seem important. If anyone has any ideas, is in need of more info, or has a working driver for the 8811CU, please let me know! As I'm a total newbie when it comes to debugging driver install scripts, any pointers would be appreciated. Thanks in advance.
And I'm on Ubuntu 18.04.1 for reference.
I bought the same thing (Ourlink AC600) from Amazon too two weeks ago. I did not try the Linux driver from the CD because it's dated 2015. I also tried ourlink.us website but the driver download link lead to a dead-end. However, I managed to just install it on my ubuntu box today after some web-digging. Here are my setup/steps:
Dell core duo desktop (wired only) with Ubuntu 18.04.1 (up-to-date via: sudo apt-get update)
Plugin the AC600, turn on desktop, login.
Make sure you have required build package (via: sudo apt-get install linux-headers-generic build-essential git)
git clone https://github.com/gnab/rtl8812au (download with your wired connection. Also, I did this in ~/Downloads dir to keep my home dir clean)
cd rtl8812au
sudo make (Only see one or two warnings saying that some code will never be executed, ignore them)
sudo make install (do this only after the driver is built in step 6)
Reboot, unplug your wired network line.
Log back in and click upper-right corner down-triangle, click wireless connection and set it up.
My Ubuntu box goes wireless now. That's how I did it. Hope this helps!

Cannot find script files with OpenOCD

I'm trying to use OpenOCD together with my ST discovery board, following this tutorial: https://japaric.github.io/discovery/README.html. When verifying the OpenOCD installation I get the following error:
I've tried providing absolute paths to all files, it does not work. I also tried using the script files found in the scripts/board folder. They showed similar issues, the files cannot be found. Any pointers on solving this would be great.
My host computer is running Windows 10.
cd to /cygdrive/c/OpenOCD/share/openocd/scripts and then execute openocd -f file1 -f file2.
Alternatively, command shown in the picture of the question seems to work in the normal windows command prompt no matter the current working directory.

./build.sh inari fails trying to build Firefox OS for inari device

I am trying to build firefox os on a Ubuntu 12.04 64 (4Gb RAM,30GB of free space, GCC-4.8.1 and g++4.8.1) following strictly all the steps from developers.mozilla and the true it is not working and I need help from community in the very last step, with my inari device connected in dev mode and visible from adb devices ./build.sh inari is giving me this error:
Blob setup script has changed, re-running Pulling files from
**../../../backup-inari** cat: **../../../backup-inari/system/build.prop**: No such file or directory Found firmware with build ID Pulling "`libOmxAacDec.so`" cp: cannot stat
**../../../backup-inari/system/lib/libOmxAacDec.so'**: No such file or directory Failed to pull `libOmxAacDec.so`. Giving up.
Build failed!
Build with `|./build.sh -j1|` for better messages
If all else fails, use |rm -rf objdir-gecko| to clobber gecko and |rm -rf out| to clobber everything else.
i tried also doing this rm stuff and start from the beginning with ./config.sh with the same result
This error seems to be causing because you either have a different version from what the builder is expecting. Or that you don't have root access to the device.
It is because of this bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1121600
Please, report it and I could take it a look. Tell what branch are you trying to compile and any other relevant information.

SCP error: Bad configuration option: PermitLocalCommand

When I execute this command below:
scp -P 36000 hdfs#192.168.0.114:~/tmp.txt SOQ_log.txt
I get an error:
command-line: line 0: Bad configuration option: PermitLocalCommand
Does anyone know why?
scp runs a copy of the ssh program to create the communications channel, and it runs ssh with the options:
-oForwardAgent=no -oPermitLocalCommand=no -oClearAllForwardings=yes
So that explains where the "PermitLocalCommand" option is coming from in the first place. I'll add that sftp uses the same options to run ssh, so it'll probably display the same behavior.
"PermitLocalCommand" is normally a valid ssh configuration option. If your copy of ssh is complaining about it, then it seems that your copy of ssh isn't the normal copy of ssh that goes with your copy of scp.
This serverfault question suggests that the error could be due to someone installing a malware version of ssh (ie, a rootkit) on your system. This forum thread also suggests that the problem is due to having an altered version of ssh, which was fixed by removing and reinstalling the OpenSSH client utilities.
An alternate explanation would be that someone--maybe your Linux distro maintainer--has installed a version of ssh on your system with that option removed, and you're using it unawares. Or you have a very old version of the ssh program for some reason, which doesn't support the option.
My system is CentOs 5.9
I'm facing the same problem, I found it to be due to this configuration line in /etc/ssh/sshd_config:
# override default of no subsystems
Subsystem sftp /opt/libexec/sftp-server
But I cannot run /opt/libexec/sftp-server, it is broken for some reason
now it is solved by reinstall the remote openssh-server:
yum erase openssh-server
yum install openssh-server
now the changes to
# override default of no subsystems
Subsystem sftp /usr/libexec/openssh/sftp-server
and /usr/libexec/openssh/sftp-server is runnable
don't forget to execute:
/etc/init.d/sshd restart
Sometimes command cannot parse this kind of stuff
:~/
Id change it to the full path.

Resources