appleboy / appleboy/ssh-action
Mask hosts with port properly
- Dominant language
- Shell
- Stars
- 6.2k
- Forks
- 679
- Avg merge
- 35m
- Merged PRs (30d)
- 1
Description
## Describe the bug
Hosts with the ports are not masked properly.
Add a secret `HOST_PORT = 1.1.1.1:22` and in the logs you will see the host IP address - `1.1.1.1:`. Make sure to add a working configuration, because IP is shown only when `script` is executed.
## Yaml Config
```yaml
name: remote ssh command
on: [push]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: executing remote ssh commands using password
uses: appleboy/ssh-action@v1
with:
host: ${{ secrets.HOST_PORT }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
script: "echo I\'m; whoami; echo on; hostname"
```
## Related environment
One of the workaround is to add one more `HOST_MASKED=1.1.1.1` secret with the just IP, to mask it.
Also, it would be very useful to improve existing masking and make it more user friendly
```diff
- ***: I'm user on hostname-1
- ***: I'm user on hostname-2
+ HOST-1: I'm user on hostname-1
+ HOST-2: I'm user on hostname-2
```
When you have multiple hosts and they are all masked, it is not clear on which one which output did we get.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.