Log in to Linux Instance Using SSH Key on Linux or Mac
Updated at:2025-10-20
- Find the storage path of the downloaded .txt key pair file on your local machine, e.g.,
/root/vm_key-k-bpuiGkwG.txt(vm_key-k-bpuiGkwG.txt is the .txt file generated when you created the key pair.) - Open the Linux/MAC terminal and modify the key pair file attributes:
chmod 400 /root/vm_key-k-bpuiGkwG.txt - Run the command in terminal:
ssh -i /root/vm_key-k-bpuiGkwG.txt root@ EIP of Instanceto sign in to your Baidu Cloud Compute.
