Hướng dẫn tạo và kết nối SSH tới EC2

rước khi cài đặt, bạn cần kết nối với EC2 instance của mình thông qua SSH. Đây là cách thực hiện:
Truy cập AWS EC2 Console:
Mở AWS EC2 Console trên trình duyệt.
Đăng nhập bằng tài khoản AWS của bạn.
Tìm EC2 Instance của bạn:
Trong EC2 Dashboard, chọn mục Instances từ menu bên trái.
Tìm instance bạn muốn cài đặt Node Exporter, sau đó ghi lại Public IP của nó.
Kết nối qua SSH:
Mở terminal (trên macOS/Linux) hoặc Command Prompt/PowerShell (trên Windows).
Sử dụng lệnh sau để SSH vào instance: bash
ssh -i /path/to/your/udacity-key.pem ubuntu@your-ec2-public-ip
Thay /path/to/your/udacity-key.pem bằng đường dẫn đến file khóa riêng của bạn (ví dụ: ~/Downloads/udacity-key.pem).
Thay your-ec2-public-ip bằng địa chỉ IP công khai của instance (ví dụ: 54.123.45.67).
Ví dụ: bash
ssh -i ~/Downloads/udacity-key.pem ubuntu@54.123.45.67
Lưu ý: Đảm bảo file .pem của bạn có quyền truy cập đúng (chmod 400 udacity-key.pem).
Subscribe to my newsletter
Read articles from Justin directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
