GitHub action to forward a remote connection to a local port over SSH.
You must have a passwordless SSH key set up on the remote server.
Variable | Description |
---|---|
ssh-key |
SSH private key |
ssh-host |
SSH host |
ssh-port |
SSH port |
ssh-user |
SSH user |
local-port |
Local port |
remote-host |
Remote host |
remote-port |
Remote port |
jobs:
job_id:
steps:
- uses: 'actions/checkout@v3'
- uses: selfagency/ssh-port-forward-action@v1.0.5
with:
ssh-key: ${{ secrets.SSH_KEY }}
ssh-host: your-host.com
ssh-port: 22
ssh-user: username
local-port: 6379
remote-host: localhost
remote-port: 6379
- run: 'redis-cli -p 6379 ping'