Capistrano private key - configuration

I have Capistrano installed in my local virtual machine with Linux environment. Also I have a user created in remote server and public/private keys pare generated by PUTTYGEN(private.ppk and id_rsa.pub).
All work fine from windows when I'm trying to connect to the server using password-less method but all will go down if I try to use Capistrano tool, because it will ask me a password from my ssh user which I don't know.
So the only way I can manage with it is make Capistrano to use private kay authentication method.
Could you give an advice to me what I have to change in config of Capistrano to work with private key?

Related

How to securely connect to a database in Next.js app (using Prisma and MySQL) deployed to Vercel (serverless)

My MySQL database on DigitalOcean is locked down to only be accessible via local connection.
I'd strongly prefer to keep it secure like that (i.e. not to open it up).
I'm used to using SSH tunnels to connect to it (such as ssh -L 3306:localhost:3306 -i ~/.ssh/id_rsa myusername#myhost).
Now that I'm deploying a Next.js app (with Prisma) to Vercel, I'm trying to figure out the appropriate DATABASE_URL environment variable.
How can I set the DATABASE_URL environment variable (or whatever other relevant setting) such that my Next.js backend is able to securely connect to my remote database that is only open to local connections?
I couldn't tell from the docs.

How to login to PhpMyAdmin with a Deck.app mysql instance?

Using the deck app, that uses Multipass & Docker to build containers and instances of specific technologies (such as Laravel, CodeIgnite, Apache, etc.,) to create a mysql instance it installs a copy of phpmyadmin and allows you to view the server through the browser.
I cannot logon to the phpmyadmin page that is created by this mysql/phpmyadmin instance in the deck app
I have messed around using CLI (terminal) to initiate the server to make it active, however this generally resulted in errors.
I have web hosting that allows me to use remote myqsl through cpanel but I don't know how to connect it to a localhost.
I would like to know how to login or use the mysql server.
I would appreciate advice on what I need to do to make this new mysql instance usable, so I can get a username, password & database name to utilise in a laravel project.
I would also like to know if there is any better solution for creating a mysql & phpmyadmin database to use for a laravel project.
Thanks in advance!
I have messed around using CLI (terminal) to initiate the server to make it active, however this generally resulted in errors.
What are the errors?
I have web hosting that allows me to use remote myqsl through cpanel but I don't know how to connect it to a localhost.
You wouldn't; you'll want to install your own phpMyAdmin locally rather than connecting your web host to your local server. You should not expose your local database server to the internet.
I would like to know how to login or use the mysql server.
Using the password you set during installation, or if you weren't prompted, usually it's a blank password.

How can i install SMB Client on Openshift Gear

How can i install SMB Client on Openshift Gear
Actually i have successfully installed OwnCloud Using https://hub.openshift.com/quickstarts/4-owncloud
but the only problem is after installing the External storage support plugin it gives me hard warning Note: "smbclient" is not installed. Mounting of SMB / CIFS, SMB / CIFS using OC login is not possible. Please ask your system administrator to install it. so it clearly suggest that i need to install smbclient on the server which i cant install as i don't have sufficent privilage on server.
Can anybody help? Any cartrigde or any way to achieve it
SMB is not enabled for users to use on OpenShift online, and you are correct that users do not have the required permissions to install it. unfortunately there is really no way around this. If you need to use SMB Client, you really need your own Virtual Machine that you have root access to to install whatever software you need.

No environment variables in OpenShift

I have created a new OpenShift account for a new application I'm developing.
I have added a MongoDB cartridge for the database, and a Tomcat cartridge for the Java web application.
I now need to connect to the database from my Java web app, but I miss two authentication details:
$OPENSHIFT_MONGODB_DB_HOST
$OPENSHIFT_MONGODB_DB_PORT
As far as I know, I have to type rhc env list -a the_name_of_my_app in the console, but my application seems to have no environment variables set.
What can I do?
Apparently, the default enironment variables are visible only via ssh.
In order to see them, you have to type rhc ssh <appid-as-seen-on-openshift-console> followeb by env.
you can see environment variables by doing ssh to openshift. Also you can use openshift port forwarding feature to setup a connection locally to your database.
Openshift blog link for port forwarding

Openshift unable to connect to the server

I am having issues with setting up Open shift and getting the following error after connecting to my server domain:
Command:
User$ rhc setup --server=app-domain.rhcloud.com
Result:
The server has rejected your connection attempt with an older SSL protocol.
Pass --ssl-version=sslv3 on the command line to connect to this server.
I am not sure what this is telling me to do. I tried using the instruction literally and it does not recognize the command.
Any ideas?
You should not pass rhc setup the --server flag unless you are running your own OpenShift Origin or OpenShift Enterprise broker. For OpenShift Online, just run the rhc setup command with no other options and it will setup fine. If that command messed up your express.conf file (which it should not have) you just need to delete your ~/.openshift/express.conf file then run rhc setup again without any flags. Basically you tried to point rhc to your gear as an OpenShift Online broker, which will not work.
I ended up answering this on another forum post:
The only way that this worked for me was to actually create a SSH key locally with ssh-keygen -p without rhc setup and "not" giving it a password. I then went back to OpenShift clicked add a key and pasted the contents of my rsa file.
There is obviously some kind of bug with authentication on Openshift or the installation is not right.
It would be good to find out what is going on and why does it work if I do it, this way.