Tag: port forwarding

  • SSH port forwarding/tunneling for MySQL connection

    Create an account on the remote MySQL database server. useradd -s /bin/false remote_user mkdir /home/remote_user/.ssh touch /home/remote_user/.ssh/authorized_keys chown -R remote_user:remote_user /home/remote_user/.ssh chmod 755 /home/remote_user/.ssh chmod 600 /home/remote_user/.ssh/authorized_keys Add MySQL permissions in the remote MySQL database to allow user connections from localhost. USE mysql; GRANT ALL ON db.* TO [email protected] IDENTIFIED BY ‘database_pass’; FLUSH PRIVILEGES; Now, […]