Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Wed Aug 12, 2015 9:19 am 
Offline
Senior Newbie
User avatar

Joined: Wed Aug 12, 2015 9:07 am
Posts: 9
Hi i'm following the tutorial below

https://www.linode.com/docs/tools-refer ... n-to-rsync

I already do ssh-keygen by following this tutorial https://www.linode.com/docs/security/se ... ur-server/

so i skipped that part in rsync tutorial page and i'm able to do this in my local machine:

scp ~/.ssh/id_rsa.pub user@hostname.com:/home/user/.ssh/uploaded_key.pub


But this line:

ssh user@hostname.com "echo `cat ~/.ssh/uploaded_key.pub` >> ~/.ssh/authorized_keys"

gives me error:

ssh username@XXXX "echo `cat ~/.ssh/uploaded_key.pub` >> ~/.ssh/authorized_keys"
cat: /Users/xxx/.ssh/uploaded_key.pub: No such file or directory
Permission denied (publickey).

what does it mean? I try to ignore it and do rsync command:

rsync -a ssh [source] user@XXXX:/var/www/sandbox/test_rsync

It gives me a Permission denied (13) error.

I just hope that his forum is still alive and give me tips because opening a ticket for this will probably get ignored.


Top
   
PostPosted: Wed Aug 12, 2015 11:37 am 
Offline
Senior Member

Joined: Sun Aug 31, 2008 4:29 pm
Posts: 177
Quote:
ssh username@XXXX "echo `cat ~/.ssh/uploaded_key.pub` >> ~/.ssh/authorized_keys"
cat: /Users/xxx/.ssh/uploaded_key.pub: No such file or directory


/Users/xxx/.ssh/uploaded_key.pub isn't found on the remote system. Try specifiying the full path to the file:

Quote:
ssh username@XXXX "echo `cat /home/user/.ssh/uploaded_key.pub` >> ~/.ssh/authorized_keys"


The error is due I think to the tilde (~) being interpreted as your home directory on the local machine (/Users/xxx) rather than your home directory on the remote machine (/home/user).

_________________
sleddog


Top
   
PostPosted: Wed Aug 12, 2015 11:48 am 
Offline
Linode Staff

Joined: Mon Sep 29, 2014 4:47 pm
Posts: 90
Twitter: FelicianoTech
How many machines are you working with here? Your local one and one server? Two?

Which user are you remotely connecting to? What is the ownership of the directory? You can find out that last part by running the following commands:

ls -la /var/www/sandbox/
ls -la /var/www/sandbox/test_rsync


Top
   
PostPosted: Wed Aug 12, 2015 12:20 pm 
Offline
Linode Staff

Joined: Wed Jul 01, 2015 10:33 am
Posts: 59
Opening a ticket for this shouldn't get ignored, you should still try that imo. As for this, are you having issues using your public key normally to authenticate?


Top
   
PostPosted: Thu Aug 13, 2015 9:12 pm 
Offline
Senior Newbie
User avatar

Joined: Wed Aug 12, 2015 9:07 am
Posts: 9
Hello, thanks to you all i'm able to resolve this. It was a permission problem because I can rsync in my /home/user directory without any problem.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group