This can be even done on the public nic of firewallhost, but you want it on localhost as you don't want expose your mysql port to the public ) Screen -d -m /usr/bin/ssh -v -o "StrictHostKe圜hecking=no" -o "UserKnownHostsFile=/dev/null" -o "BatchMode=yes" -i /your/.ssh/ssh_host_dsa_key -q -L locahost:33060:localhost:3306 must just 'imagine' that such an ssh tunnel can 'transport' any port stream from one machine to another by opening a 'new' port on the machine you create that ssh tunnel (here firewallhost). This can be put into your rc.local or whatever you use on firewallhost. To have the ssh tunnel on firewallhost persistent, you can start it there like the following way with a keyfile (for accessing databasehost) and an detached process thru screen. MySQL Hostname: localhost (as we opened a tunnel on firewallhost's localhost)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |