programming:bash:ssh_connection
Differences
This shows you the differences between two versions of the page.
Last revisionBoth sides next revision | |||
programming:bash:ssh_connection [2012/08/26 09:41] – created sbolay | programming:bash:ssh_connection [2015/09/21 12:36] – [Notes] sbolay | ||
---|---|---|---|
Line 145: | Line 145: | ||
In my point of view, it is better to connect to the remote server as a regular user instead of root for security purpose. If you need root access, configure the / | In my point of view, it is better to connect to the remote server as a regular user instead of root for security purpose. If you need root access, configure the / | ||
+ | ===== Gateway/ | ||
+ | |||
+ | SQL Server(localhost: | ||
+ | |||
+ | On the GATEWAY machine: | ||
+ | ssh -nNf -L 1212: | ||
+ | ssh -nNf -R 2424: | ||
+ | |||
+ | Check if the port 2424 is opened on SQL Client machine | ||
+ | # lsof -i :2424 | ||
+ | COMMAND | ||
+ | sshd 5161 | ||
+ | sshd 5161 | ||
+ | |||
+ | And then, you can access your DB with | ||
+ | mysql -u username -p pw --protocol=TCP --port=1212 |
programming/bash/ssh_connection.txt · Last modified: 2015/09/21 12:42 by sbolay