熱門文章

2017年2月7日 星期二

aws ec2 如何透過ssh使用phpmyadmin

使用marketplace快速安裝wordpress後,我想要使用phpmyadmi來操作MySQL 卻發現

For security reasons, this URL is only accessible using localhost (127.0.0.1) as the hostname.

不能直接用瀏覽器,必須透過以下方法:




原文

For security reasons, these applications are accessible only when using 127.0.0.1 as the hostname. To access them from a remote system, you must create an SSH tunnel that routes requests to the Apache Web server from 127.0.0.1. This implies that you must have an SSH private key and be able to connect to your server over SSH in order to access these applications remotely.

Linux And Mac OS X

To access the application using your Web browser, create an SSH tunnel, as described below.
  • Make sure you can log in to the server using SSH. Refer to the FAQ for more information on this.
  • Open a new SSH session to the server using the command below:
     ssh -N -L 8888:127.0.0.1:80 -i KEYFILE bitnami@SERVER-IP
    
    Remember to replace KEYFILE in the previous commands with the path to your private key file, and SERVER-IPwith the IP address or hostname of your virtual machine. Note that if successful, this command will create an SSH tunnel but will not display any output on the server console.
While the tunnel is active, you should be able to access the phpMyAdmin console through the secure SSH tunnel you created, by browsing to http://127.0.0.1:8888/phpmyadmin.


盡量翻譯出來.....


因為安全因素,這程式僅能允許主機(指雲端server)本地連線。如需遠端存取(就是你在用的這台client),你必須經由SSH方式向主機的apache伺服器提出請求。這表示你必須有SSH私鑰才能透過SSH連到server進而使用該程式。

Linux and Mac

使用瀏覽器存取此程式前,你必須透過SSH方式,步驟如下:

  • 確定你能夠透過SSH登入server
  • 另開視窗,使用以下command:

 ssh -N -L 8888:127.0.0.1:80 -i KEYFILE bitnami@SERVER-IP
keyfile : 你的私鑰。可以直接拖曳檔案得到私鑰路徑避免打錯
bitnami@SERVER-IP :下圖紅框即是



輸入後終端機並不會有任何的反應,請直接到瀏覽器輸入 http://127.0.0.1:8888/phpmyadmin

完成!!

參考 參考2

沒有留言:

張貼留言