Change port for test
This commit is contained in:
@@ -21,14 +21,14 @@ jobs:
|
|||||||
|
|
||||||
- name: Run SSH server
|
- name: Run SSH server
|
||||||
run: |
|
run: |
|
||||||
docker run -d --name ssh-server-test -p 2222:22 -e COMMAND="echo 'SSH connection successful'" ssh-server-test
|
docker run -d --name ssh-server-test -p 2223:22 -e COMMAND="echo 'SSH connection successful'" ssh-server-test
|
||||||
|
|
||||||
- name: Wait for server to start
|
- name: Wait for server to start
|
||||||
run: sleep 5
|
run: sleep 5
|
||||||
|
|
||||||
- name: Test SSH connection
|
- name: Test SSH connection
|
||||||
run: |
|
run: |
|
||||||
output=$(ssh -p 2222 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@localhost "echo test")
|
output=$(ssh -p 2223 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@localhost "echo test")
|
||||||
if [ "$output" = "test" ]; then
|
if [ "$output" = "test" ]; then
|
||||||
echo "SSH connection test passed"
|
echo "SSH connection test passed"
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user