remove null output
This commit is contained in:
@@ -30,7 +30,7 @@ jobs:
|
||||
|
||||
- name: Test SSH connection
|
||||
run: |
|
||||
output=$(docker run --rm --network test-net alpine sh -c "apk add --no-cache openssh-client >/dev/null 2>&1 && ssh -p 22 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=10 root@ssh-server-test 'echo test559920' 2>/dev/null")
|
||||
output=$(docker run --rm --network test-net alpine sh -c "apk add --no-cache openssh-client >/dev/null 2>&1 && ssh -p 22 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=10 root@ssh-server-test 'echo test559920'")
|
||||
echo "OUTPUT $output"
|
||||
if echo "$output" | grep -q "test559920"; then
|
||||
echo "SSH connection test passed"
|
||||
|
||||
Reference in New Issue
Block a user