Nextcloud Box - Can't access via SSH

Hi,

So I’m on my way to configure my Nextcloud Box to redirect to HTTPS and connect it to the Internet but I can’t SSH to it…
I have set up the box and can access it via browser.

To ssh, I used the exact command:
ssh ubuntu@nextcloud.local
and also tried with the device’s IP address.

There, I’m asked for a password, so I write “ubuntu” but it just shows “Permission denied. Please try again”

I’m using a Raspberry Pi model B v1.2 and the image I’m using on my SD card is “ubuntu-core-16-armhf-rpi2-installer-20170329.img”

What am I doing wrong ?

I’m trying to follow the method used for new models, sinc I’m using a ubuntu-core image I figured I had to do this one…

But I need the “Brand” and the “Model” from my device provider… Which device are we talking about ? The Rpi or the WD disk ? And how doI get access to these two pieces of information ?

Does Nextcloud (brand) Box (model) not work?

Cc @jospoortvliet @oparoz

where did you get the image from? Did you install it by yourself or did it get come with the box or pi?

@dev0 : I got it from the repository and installed it myself since the image that came with the box wouldn’t work with my Pi (model B v1.2)

and there you weren’t asked for a password?

The newer image/Ubuntu core uses keys by default, requiring you register your instance (or something, it wasn’t straightforward when I did it either).

@dev0 I’m not sure I understood the question, but yes I was asked for a password when I was trying to SSH.

Otherwise, ok, I will try tonight with “Nextcloud” and “Box”, I’ll keep you posted

i meant if you set up a linux you get to a screen where you need to set your initialpassword by yourself. isn’t it there so?

No, I just downloaded the image from Nextcloud’s repository, wrote it on the SD card, put the SD card in the Pi and let Nextcloud install itself.

See above @dev0

@JasonBayton Welp, tried the whole thing but it didn’t work… Is it because of the brand and model names ?
Here’s what is displayed when I do ssh -v ubuntu@IP :

OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g 1 Mar 2016
debug1: Reading configuration data /home/ui/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to IP [IP] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/ui/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/ui/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/ui/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/ui/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/ui/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/ui/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/ui/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/ui/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.2
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.2p2 Ubuntu-4ubuntu2.1
debug1: match: OpenSSH_7.2p2 Ubuntu-4ubuntu2.1 pat OpenSSH* compat 0x04000000
debug1: Authenticating to IP:22 as 'ubuntu’
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256@libssh.org
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:if0EtcnWV6GsBOkPjt4Bx0Xyp4IUNoZTwJNzaghHJs8
debug1: Host ‘IP’ is known and matches the ECDSA host key.
debug1: Found key in /home/ui/.ssh/known_hosts:6
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<rsa-sha2-256,rsa-sha2-512>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /home/ui/.ssh/id_rsa
debug1: Trying private key: /home/ui/.ssh/id_dsa
debug1: Trying private key: /home/ui/.ssh/id_ecdsa
debug1: Trying private key: /home/ui/.ssh/id_ed25519
debug1: Next authentication method: password
ubuntu@IP’s password:

actually it isn’t look like that there is a simple solution to that, so I suggest you plug your pi to a screen and a keyboard, boot it from a live-usb-stick and reset the password via /etc/shadow by yourself.

@Hugogerva and whoever else is struggling with this:
You have the new ARM image and want to log in remotely? You need to set up some stuff before you can SSH in, it doesn’t have a default username/pw set up for security reasons.

See:

Now I’ve been told (but haven’t been able to check) that this documentation isn’t super duper good, or even - wrong :wink:

I’m willing and able to share some basic documentation that should help you, however that can’t be put online directly. So I’m willing to share but for a tit-for-tat: if it helps, would you be willing to adjust the documentation on the wiki? I can give you access easy enough :stuck_out_tongue:

Who’s up for that?

You’ve got my details, feel free to ping it over and I’ll see if I can provide an ETA once I know what’s involved :slight_smile:

Sure I would be happy to help as well !

I had same luck as @Hugogerva… just received NextCloud Box… installed Pi 2 model B v1.1 amd inserted SD card that came with pkg from Western Digital.

Had connected to HDMI so watched lengthy installation. Ultimately completed so went to web browser on another machine and went to “nextcloud.local”… after a while the php NextCloud login page appeared.
Seemed to be asking for account and password to use in setting up admin account. Typed in my desired credentials and it went to lala land?

Can ssh into box so did sudo reboot… still no luck getting into web interface. SSH shows me at 192.168.1.44… also shows;

ubuntu 16.04.1 LTS Linux 4.4.0-1017-raspi2 armv71

All the marketing material when ordering suggested I was going to get a preconfigured SD card with Ubuntu Core w/ Snappy… since I’m familiar with Raspbian I opted for the preconfigured Ubuntu Core to help me transition. Bugger :wink:

Unfortunately, I did not copy the SD image before lauching the “plug and play” process so it’s probably all lunched up at this point. Any way to start over?

Cheers,
Tony

@jospoortvliet Still waiting for the doc !

An update to my earlier post;

Returned to dig into fixing my NextCloudBox… found a link in this thread? on how to start the NCBox from scratch by tweaking the root entry in the cmdline.txt.

After the lengthy installation process the admin web screen came up for my admin account credentials… Phew… we’re back. This time I used “admin” for the account :wink: … and it worked! Excitedly (using my Firefox browser) I created a new folder and tried to upload a new file from an NAS mounted on my Pi3 I’m using as my “PC”. The upload failed, and unfortunately, I did not record the exact error… frustration shuts down the frontal cortex ;-)… and the web interface locked up and was unrecoverable after a reboot of the NCBox (which I could still access via SSH) as well as my Pi PC with my FireFox browser. Trying Chromium gave me a 500 Server error. I left in frustration.

A day or two later I re-attempted the admin web portal and it came up and said ready to upgrade to 11.0.3… OK? I gave it the go ahead and the upgrade appeared to go smoothly. Login was successful… and when I went to repeat the same file upload attempt it worked!

Now I was ready to do some recommended config changes… BUT… I can’t seem to find any of the mentioned config files in their usual places? It appears the snap architecture “sandboxes” environments so simply entering “php -v” at the SSH terminal cmdline as ubuntu responds with no such cmd?

There is also no /var/www/ nor /etc/apache2… and a2enmod is not accessible.

Is this due to the snap model and if so can someone point me to docs on how I can operate from the cmdline to properly config my LAMP/Nextcloud?

Thanks.

I am sorry to say, but is using a distribution that requires an account with a certain company to log in locally really a good idea? Is their backend even FLOSS? I only know from the old days of their failed cloud service called Ubuntu One, which was not Open Source at the backend level and was only released looong after they closed up shop.

It is a bit of a inconsistency: While hosting a system to keep data private, one still needs an account with a certain company to log into the system beneath. Now that Debian has official snap support, wouldn’t that distribution be a better fit?