If I boot a 5.7 install disk with 'linux rescue selinux=0', let it start the network and detect the installed system, ssh seems to work, but rsync fails with "rsync: connection unexpectedly closed (0 bytes received so far) [receiver]). Shouldn't it work as long as the underlying ssh connection works? It doesn't prompt for the ssh password and using -essh doesn't change it. -- Les Mikesell lesmikesell at gmail.com
Les Mikesell writes:> If I boot a 5.7 install disk with 'linux rescue selinux=0', let it > start the network and detect the installed system, ssh seems to work, > but rsync fails with "rsync: connection unexpectedly closed (0 bytes > received so far) [receiver]). Shouldn't it work as long as the > underlying ssh connection works? It doesn't prompt for the ssh > password and using -essh doesn't change it. >Les, What commands are you using exactly? To or from the rescued host? Also, are you using ssh non-standard ports? -- Nux! www.nux.ro
On Tue, Jan 31, 2012 at 1:50 PM, <m.roth at 5-cent.us> wrote:> <snip> >>> That's odd, try rsync -e 'ssh -v' to get some more details. >>> Also you will want to use some parameters to rsync (like -av or maybe >>> even >>> -z for compression etc). >> >> I'm getting a >> usage: ssh ?[bunch of ssh options] >> like it is giving the wrong command line to ssh. Or maybe the lack of >> an /etc/ssh/ssh_config in this environment is breaking it, although my >> own ssh commands and connections seem to work. ?I haven't done the >> chroot into the installed mount since I was planning to overwrite it. > > Any chance that either your system, or the rescued system, are blocking > it, because it doesn't know who your host, or your host doesn't know the > rescued host? > > I'd try chrooting and restarting sshd.No, I'm trying to have rsync make an outbound connection over ssh from the rescue environment and getting what looks like an argument error from ssh. Ssh itself works and I can connect to the same target if I run it directly, and the exact same rsync command lines work from a normal host. Either rsync isn't setting up the remote command right, or ssh isn't allowing it and giving a bad error message. The goal here was basically to clone a running machine into a new VMware image booted into rescue mode. Maybe there's a better way to do that anyway. The source is using RAID1 drives in a layout that the VMware converter won't handle. The tar | tar copy seems to be mostly OK with a little tweaking of fstab, etc. I'm going to give 'ReaR' (from EPEL) a try too - it is supposed to do most of the grunge work for you but you have to intervene manually if you want to change the disk layout. -- Les Mikesell lesmikesell at gmail.com
On Tue, Jan 31, 2012 at 4:01 PM, <m.roth at 5-cent.us> wrote:>> On Tue, Jan 31, 2012 at 3:14 PM, Ljubomir Ljubojevic <office at plnet.rs> >> wrote: >>> On 01/31/2012 09:47 PM, Les Mikesell wrote: >>>> No, I'm trying to have rsync make an outbound connection over ssh from >>>> the rescue environment and getting what looks like an argument error >>>> from ssh. ? Ssh itself works and I can connect to the same target if I >>>> run it directly, and the exact same rsync command lines work from a >>>> normal host. ?Either rsync isn't setting up the remote command right, >>>> or ssh isn't allowing it and giving a bad error message. > <snip> >> I'm going the other direction (originating the command from the rescue >> host), but yes, tar works over ssh, and and ssh works by itself. ?The >> part that doesn't work is ssh when invoked by rsync, either by default >> or with an explicit '-essh' argument, and the error message looks like >> an ssh argument error so it doesn't even prompt for the password. > > AUGH! I think I have it: are the versions of rsync on the rescue instance > and the other server the same?It's not getting that far. I'm getting an error trying to start the local ssh. And at this point I have working VM from the tar copy, _except_ that it isn't matching a driver to the virtual NIC. I'm glad I'm not restoring a real backup with a dead machine here... Since I don't need this today, I think I'll try ReaR to see if it gets it right. It builds a bootable iso that is supposed to re-install on bare metal. -- Les Mikesell lesmikesell at gmail.com