Solved ssh Error : "Ambiguous output redirect."

Hi again,

I am trying to setup a rync backup from NAS (wdmycloud) to a FreeBSD 10.1 box. I also want to use ssh.

I do:
ssh-keygen -t dsa
ssh-agent bash
ssh-add
ssh-copy-id root@freebsdbox


The last command gives me "ambiguous output redirect" error.

Googling I found this bug

How do I get around it?
The NAS does not have csh, only sh and bash.

Thanks
 
Last edited by a moderator:
Oops I spoke too soon. The answer was staring me in the face. I changed the root's shell to sh on FreeBSD's box and it worked.
I do apologies.
 
It is generally recommended not to change the root user's shell. It should not be necessary, either. ssh-copy-id begins with
Code:
#!/bin/sh

Which leads to another thought: on Linux, sh and bash are the same thing. They are not on FreeBSD, and linking one to the other will cause problems.
 
That is what I was thinking. I abandoned the idea.
I will use a normal user which I'll make responsible for the backups.
I don't think there is a way to make ssh not ask for passphrase and I want the passphrase :)
The only other way I was reading about it to use a ssh tunnel.
Tried to use rsync as a daemon, but I am slowly giving up. I don't how it can help.
 
I don't think there is a way to make ssh not ask for passphrase and I want the passphrase :)

You can use ssh-agent plus security/keychain for that.

EDIT: you still will need to enter the passphrase, but just when you do a reboot.

It is for Linux, but you should be able to easily adapt for your purposes.
 
Back
Top