[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
howtos:misc:connect_client_over_ssh_tunnel_to_mariadb [2019/06/25 14:57 (UTC)] – [Sources] mahafyi | howtos:misc:connect_client_over_ssh_tunnel_to_mariadb [2019/06/26 01:51 (UTC)] (current) – [How to connect mysql client over SSH tunnel to Mariadb server] mahafyi | ||
---|---|---|---|
Line 3: | Line 3: | ||
For setting up your working Mariadb server, [[howtos: | For setting up your working Mariadb server, [[howtos: | ||
- | You may want to connect clients to the database server over network securely. Instead of using TLS (which is available natively) for this, the same can also be achieved by tunneling over SSH by following the below steps. | + | You may want to connect clients to the database server over network securely. Instead of using TLS (which is [[https:// |
__**On the database server**__ | __**On the database server**__ | ||
Line 14: | Line 14: | ||
__**On the client machine**__ | __**On the client machine**__ | ||
- | Generate keys for authentication ssh-keygen without a passphrase as follows. You may use RSA also. The below command will create a private and public key after giving you file name option. Just hot enter to avoid using a passphrase. | + | Generate keys for authentication |
ssh-keygen -t ecdsa -b 521 -C my-comments | ssh-keygen -t ecdsa -b 521 -C my-comments | ||
The public key with filename extension .pub should be installed in the database server user’s authorized_keys. The contents of the .pub file can be copy pasted or you can use a command line utility like ssh-copy-id as shown below. Never copy the private key to other server. | The public key with filename extension .pub should be installed in the database server user’s authorized_keys. The contents of the .pub file can be copy pasted or you can use a command line utility like ssh-copy-id as shown below. Never copy the private key to other server. | ||
Line 32: | Line 32: | ||
<!-- * Contributions by [[wiki: | <!-- * Contributions by [[wiki: | ||
Adapted from original source: [[https:// | Adapted from original source: [[https:// | ||
+ | |||
Originally written by [[wiki: | Originally written by [[wiki: | ||
<!-- Please do not modify anything below, except adding new tags.--> | <!-- Please do not modify anything below, except adding new tags.--> | ||
<!-- You must remove the tag-word " | <!-- You must remove the tag-word " | ||
{{tag> | {{tag> |