How to create ".pem file/id_rsa" instead of password in MUP?


#1

I use MUP to deploy my app to hosting.
How to create .pem file/id_rsa instead of password in MUP?
I don’t want type password much time.


#2

First you need to create a public/private key pair (If you don’t already have one). So that you can place your public key to any server you like which will allow you to connect to that server via ssh.

Digital Ocean provides a step by step tutorial for generating ssh keys. You can follow the steps here

Once you set up your SSH key, you need to add the public key to your server so that when your private key matches to that public key, you can connect to that server.

Again if you are using Digital Ocean, you can take a look at the following guide for adding your public ssh. But the principle should be similar for other services as well.

The path to your private key is generally ~/.ssh/id_rsa and to your public key is ~/.ssh/id_rsa.pub (In Linux based OS)


#3

Thanks, now It works fine.
but Now I would like to use this option on Mup Deployment

module.exports = {
  servers: {
    one: {
      // TODO: set host address, username, and authentication method
      host: '192.168.0.106',
      username: 'rabbit',
      pem: '~/.ssh/id_rsa.pub'
      // password: '1'
      // or neither for authenticate from ssh-agent
    }
  },

Please help me.