programming:bash:ssh_connection
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| programming:bash:ssh_connection [2012/08/26 09:41] – created sbolay | programming:bash:ssh_connection [2015/09/21 12:42] (current) – [Gateway/Proxy] 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 | ||
| + | |||
| + | |||
| + | ===== LINKS ===== | ||
| + | * http:// | ||
| + | * http:// | ||
programming/bash/ssh_connection.1345974080.txt.gz · Last modified: 2012/08/26 09:41 by sbolay