Open
Description
I'm trying to test locally with 'act' and getting the issue with 'act' and on gh.
| ===========================
| 2025/03/07 17:21:23 ssh.ParsePrivateKey: ssh: no key found
| 2025/03/07 17:21:23 ssh: handshake failed: ssh: unable to authenticate, attempted methods [none], no supported methods remain
EC2: OpenSSH_9.6p1 Ubuntu-3ubuntu13.8, OpenSSL 3.0.13 30 Jan 2024
WSL: OpenSSH_8.9p1 Ubuntu-3ubuntu0.10, OpenSSL 3.0.2 15 Mar 2022
I have tried everything under the sun,
e.g.
- I have copied over using xclip(xclip -selection clipboard < ~/.ssh/mg_key.pem), echo cat,
- using with --------BEGIN RSA PRIVATE KEY .......-----END RSA PRIVATE KEY
- without
- base64 -w 0 ~/.ssh/mg_key.pem > ~/.ssh/mg_key.pem.b64
name: Test EC2 conn.
on:
workflow_dispatch: # Manual trigger
push:
branches:
- main
- dev
jobs:
test-connection:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Test EC2 Connection
uses: appleboy/ssh-action@v1.2.1
with:
host: ${{ secrets.EC2_HOST }}
username: ${{ secrets.EC2_USERNAME }}
key: ${{ secrets.EC2_SSH_KEY }}
timeout: 60s
script: |
echo "Connection successful!"
echo "User: $(whoami)"
echo "Current directory: $(pwd)"
echo "Python location: $(which python || echo 'Python not found')"
echo "System info: $(uname -a)"
# Check for UV installation
if command -v uv &> /dev/null; then
echo "UV is installed: $(uv --version)"
else
echo "UV is not installed"
fi
# Check directory structure
echo "Home directory structure:"
ls -la ~
EC2_HOST=00.000.00.00
EC2USERNAME=ubuntu
EC2_SSH_KEY="-----BEGIN RSA PRIVATE KEY-----
..............
XUYbksBYBG1BWmAAD1fPcKFC3U+lF5TmEsKHJwIDAQABAoIBAFSCy/yGEshnKAxS
..................
-----END RSA PRIVATE KEY-----"
ps WSL -> EC2 connection works perfectly fine
ssh -i "~/.ssh/mg_key.pem" ubuntu@ec2-00-000-00-00.compute-1.amazonaws.com
Metadata
Metadata
Assignees
Labels
No labels