這是我的 Amazon EC2 免費套餐實體上的配置。
問題是我無法訪問我的 WordPress 資料。示例:wp-config.php、上傳檔案夾等
有 4 種方式可用于連接實體:
- EC2 Instance Connect - 它不作業,因為平臺是 Debian(它適用于 Linux2 和 Ubuntu 絕對沒問題。我嘗試啟動一個新的 Ubuntu 實體。)
- 會話管理器 - 未安裝會話管理
- SSH 客戶端 - 無論我如何創建密鑰、pem、ppk 或其他任何內容,它總是給我一個錯誤,即密鑰是公開的。
- EC2 串行控制臺 - 它僅適用于基于 Nitro 的實體,因此將實體型別從更改
t2.micro為t3.micro
除了我還可以訪問 AWS Cloud Shell,但我在那里找不到 WordPress 檔案。
如何訪問(創建/編輯/洗掉)我的 AWS EC2 Debian 實體上的檔案?
uj5u.com熱心網友回復:
在連接到您的 Debian / Wordpress 實體之前,請(再次仔細地)驗證以下一般先決條件:
- 獲取實體的 ID。
- 獲取實體的公有 DNS 名稱。
- 獲取您的實體的用戶名。
For Amazon Linux 2 or the Amazon Linux AMI, the user name is ec2-user. For a CentOS AMI, the user name is centos or ec2-user. For a Debian AMI, the user name is admin. For a Fedora AMI, the user name is fedora or ec2-user. For a RHEL AMI, the user name is ec2-user or root. For a SUSE AMI, the user name is ec2-user or root. For an Ubuntu AMI, the user name is ubuntu. For an Oracle AMI, the user name is ec2-user. For a Bitnami AMI, the user name is bitnami. Otherwise, check with the AMI provider. --> Yours is bitnami.
如果您有自定義用戶,請檢查此
- 啟用從您的 IP 地址到您的實體的入站 SSH 流量。
注意:確保與您的實體關聯的安全組允許來自您的 IP 地址的傳入 SSH 流量。VPC 的默認安全組默認不允許傳入 SSH 流量。
使用 SSH 連接到您的 Linux 實體
- 找到私鑰
- 使用以下內容設定您的私鑰的權限:
chmod 400 my-key-pair.pem
最后一步特別重要,因為你說你得到public key error。更多關于這個here。
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/466639.html
