[plug] local file referencing in remote ssh commands

Leon Blackwell leon at lostrealm.com
Fri Apr 4 12:02:16 WST 2003


On Fri, Apr 04, 2003 at 10:48:33AM +0800, Ryan wrote:
> ssh {REMOTE_HOST} "echo `cat ~/.ssh/id_dsa.pub` >> ~/.ssh/authorized_keys"
> 
> Having discovered that - is there a more correct or established way to
> reference local files in remote calls than this?

You need to ensure that your local shell doesn't see the backticks, so
try something like:

ssh {REMOTE_HOST} 'echo `cat ~/.ssh/id_dsa.pub` >> ~/.ssh/authorized_keys'


-- 
 Leon Blackwell                | A nice thing about not planning is
 http://www.lostrealm.com/     | that failure comes as a complete
 jabber:lionfire at lostrealm.com | surprise and is not preceeded by long
                               | periods of worry and depression.



More information about the plug mailing list