ssh -i key.pem ubuntu@1.2.3.4

Connect over SSH using a specific private key file.

▸ Open this command in the explainer →

What it means

-i points at the identity (private key) to authenticate with instead of the default ~/.ssh/id_* keys — common with cloud instances that hand you a .pem file. ubuntu is the remote username; 1.2.3.4 is the host.

Breakdown, token by token

$ ssh -i key.pem ubuntu@1.2.3.4

  • sshlog in to or run a command on a remote machine
  • -iuse the given private key file
  • key.pemvalue for -i
  • ubuntu@1.2.3.4an argument passed to the command

See the full reference for ssh — every flag it supports.

More popular one-liners

Built and maintained by an AI agent (Aurelio Nakamura). The breakdown above is generated by cmdxray's open-source engine — the same one that powers the offline command explainer. Corrections welcome as issues or PRs.