Kiro supports the following authentication providers:
kiro-cli or kiro-cli login. You'll be prompted to press Enter to complete sign-in in your browser.When running Kiro CLI on a remote machine (via SSH, SSM, containers, etc.), authentication works differently since the remote machine cannot open a browser.
For Builder ID and IAM Identity Center, Kiro CLI uses device code authentication. You'll see a URL and code to enter in your local browser—no additional setup required.
For social login (Google or GitHub), the CLI uses PKCE authentication which requires port forwarding. The OAuth callback redirects to localhost, which won't reach the remote CLI without a tunnel.
To sign in with social login on a remote machine:
kiro-cli login and select "Use for Free with Google or GitHub"49153)ssh -L <PORT>:localhost:<PORT> -N user@remote-host
<PORT> with the port from step 2, and user@remote-host with your remote credentials.SSH port forwarding examples:
# Basic port forwarding (replace 49153 with your actual port) ssh -L 49153:localhost:49153 -N user@remote-host # With a custom identity file (common for EC2) ssh -i ~/.ssh/my-key.pem -L 49153:localhost:49153 -N user@remote-host # Using an SSH config alias ssh -L 49153:localhost:49153 -N myserver
Troubleshooting port forwarding:
lsof -i :<PORT> on the remote to identify the process.-o ServerAliveInterval=60 to prevent timeouts.To sign out of Kiro CLI
kiro-cli logout.If you encounter problems during the authentication process, such as browser redirect failures or sign-in errors, check our troubleshooting guide for platform-specific solutions and common fixes.
Authentication methods