Trying to SCP files to my UBOSbox - getting permission denied

Questions and discussions about Indie Computing's UBOSbox
Post Reply
evonh
Posts: 7
Joined: Wed May 13, 2020 5:04 pm

Trying to SCP files to my UBOSbox - getting permission denied

Post by evonh »

evon@evonsdevice:~$ eval `ssh-agent`
Agent pid XXXXX
evon@evonsdevice:~$ ssh-add id_rsa
Identity added: id_rsa (UBOS shepherd)
evon@evonsdevice:~$ scp /home/evon/Documents/Website/mywebsite.com.key/ shepherd@x.x.x.xx:/etc/ssl/
scp: /etc/ssl//mywebsite.com.key: Permission denied
When I tried to connect as root, assuming that would give me the proper permissions, I was prompted for a password and a blank password didn't work, so I'm not sure what the password would be.

If someone could please tell me what I'm doing incorrectly and what I should be doing correctly to copy the files from my laptop to my UBOSbox I'd appreciate it. Thank you.



j12t
Posts: 142
Joined: Tue Dec 12, 2017 9:17 pm
Contact:

Re: Trying to SCP files to my UBOSbox - getting permission denied

Post by j12t »

What are you trying to do? You certainly can't write to /etc/ssl/something as user shepherd. But why would you want to?

If I had to guess, are you trying to add TLS certificates you have already to your website on UBOS? But using instructions for a distro that is not UBOS and a web server configuration that is likely rather different? That will not work ... at least not without a bunch of additional work.

If my guess is correct: ignore the certs you have already. Instead, as explained in some other thread, make sure DDNS and opening ports works with your port 80/non-TLS Nextcloud site, then redeploy the Site JSON with the non-wildcard hostname and letsencrypt flag, and that's all you need to do. No scp required or manual obtaining of certs required. (This has the additional advantage that UBOS takes care of renewing your letsencrypt certs automatically when they expire, which they do frequently.)

If my guess is incorrect: please explain :-)

evonh
Posts: 7
Joined: Wed May 13, 2020 5:04 pm

Re: Trying to SCP files to my UBOSbox - getting permission denied

Post by evonh »

Hi j12t thank you for your reply.

Yes you are correct, and I appreciate the info.

The reason I am attempting to do this despite knowing what to do for the UBOSbox is that while the process to do so is extremely simple (I appreciate the simplicity of UBOS very much) there is no step by step guides written for the new basic user that I can find about how to do what needs to be done to get the UBOSbox connected to the internet without pagekite.

Despite this, I am trying every day to get it set up and will eventually get it working. Your advice to redeploy the site is sound, but the thing that confuses me is when I am backing up the <site.JSON> prior to redeploying the site, how do I find out what the filename for my <site.JSON>? I've not created a new site, i'm simply using the nextcloud site that was created when I went through the extremely simple set up when the UBOSbox first arrived (it was a really great experience setting up the UBOSbox for the first time).

edit: I tried this

Code: Select all

% sudo ubos-admin showsite --json --siteid <siteid>
but i am unable to find my sites siteid. * doesn't work, the IP address doesn't work either. I'm not sure what to put. I've tried

Code: Select all

ubos-admin listsites
and this gives me * as the hostname, which doesn't work with

Code: Select all

sudo ubos-admin showsite --json --sideid <sideId>
any advice is appreciated.

j12t
Posts: 142
Joined: Tue Dec 12, 2017 9:17 pm
Contact:

Re: Trying to SCP files to my UBOSbox - getting permission denied

Post by j12t »

You can add "--help" for all commands, which should give you more info.

E.g. "ubos-admin listsites" to show all sites that you currently have. Perhaps add a "--detail" for more detail.

Given you have only one site, you can say "--siteid s..." (indeed with the periods, which means anything that starts with s), or specify your hostname instead of your siteid, e.g. '--hostname \*' (you need a \ to avoid wildcard expansion).

You save the Site JSON to a temporary file name, and it does not matter what you call it, e.g.

"sudo ubos-admin showsite --siteid s... --json > mysite.json"

evonh
Posts: 7
Joined: Wed May 13, 2020 5:04 pm

Re: Trying to SCP files to my UBOSbox - getting permission denied

Post by evonh »

Thanks for your help j12t.

Post Reply