2

I am trying to deploy a Meteor based project. I'm using nitrous.io, digital ocean for the server, and compose.io for MongoDB.

I already wanted to finish my deployment and run the "mup setup" command and had got this message:

Meteor Up: Production Quality Meteor Deployments


sshpass required for password based authentication

After trying to install sshpass from here http://git.io/_vHbvQ, and running the command "apt-get install sshpass" I have got the following errors:

E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

I also tried another way to install sshpass (also described here http://git.io/_vHbvQ) by creating the folder configure:

action@steady-meteor-55-179639:~/workspace/MeteorProject/configure$ sudo make install

----- WARNING: sudo access is not available; running without sudo.

----- make: *** No rule to make target install'. Stop.
action@steady-meteor-55-179639:~/workspace/MeteorProject/configure$ make install
make: *** No rule to make target
install'. Stop.

Configure folder is located in this way: ~/workspace/MeteorProject/configure/sshpass-1.05

My mup.json file looks like this:

{
  // Server authentication info
  "servers": [
    {
      "host": "XXX.XXX.XX.XX",
      "username": "root",
      "password": "123456789"
      // or pem file (ssh based authentication)
      //"pem": "~/.ssh/id_rsa"
    }
  ],
  • Try installing `sshpass` under a `root` or a user with administrative access or with `sudo apt-get install sshpass` – Tarang Jan 09 '15 at 16:44
  • @Akshat Thanks for your reply. Unfortunately, root access and apt-get isn't offered at this time in nitrous.io, so I don't have access to 'sudo' or 'apt-get'. – Baruch Yochai Jan 10 '15 at 17:03
  • In that scenario there is no other way to get passed this other than using a private key to authenticate to your server. Luckily its not too hard : https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys--2 – Tarang Jan 10 '15 at 17:23
  • @Akshat thanks Akshat. I did what explained in the article. What are the next steps? I used the 'mup setup' command again, and it is again requires ssh-pass – Baruch Yochai Jan 12 '15 at 19:46
  • 1
    Configure your mup.json to use the keyfile/pem instead of the password and be sure to comment the password out. – Tarang Jan 13 '15 at 06:08
  • @Akshat **DONE!!! You helped me to solve this problem. Thank you!** How can I mark your answers as a solution to the problem I had? – Baruch Yochai Jan 13 '15 at 13:07

1 Answers1

3

I just will conclude what @Akshat explained (special thanks to @Akshat for his help)

root access and apt-get isn't offered at this time in nitrous.io

In order to solve this problem, you need to create private key to authenticate to your server. Hare explained how doing it: digitalocean.com/community/tutorials/how-to-set-up-ssh-keys--2

After you created private keys, you need to configure your mup.json to use the keyfile/pem (which probably you have as a comment, just delete comment signs) instead of the password and be sure to comment the password out.

That is all!