Skip to content

Commit 7b9f754

Browse files
test if ssh connects
1 parent 1106664 commit 7b9f754

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/sftp-benchmark.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,16 @@ jobs:
9090
path: ./wolfssh/
9191
artifact_id: 'openssh-download'
9292

93-
- name: Put test key in authorized keys file
93+
- name: Setup OpenSSH Test Server
9494
working-directory: ./wolfssh/
9595
run: |
96+
sudo apt-get install openssh-server
9697
mkdir ~/.ssh
9798
touch ~/.ssh/authorized_keys
9899
touch authorized_keys_test
99100
echo "AuthorizedKeysFile wolfssh/keys/hansel-key-ecc.pub" >> sshd-config-test.txt
100101
echo "PubkeyAuthentication yes" >> sshd-config-test.txt
101-
echo "Subsystem sftp /usr/lib/openssh/sftp-server" >> sshd-config-test.txt
102+
echo "Subsystem sftp internal-sftp" >> sshd-config-test.txt
102103
sed -i.bak "s/hansel/$USER/" ./keys/hansel-key-ecc.pub
103104
chmod 600 ./keys/hansel-key-*.pem
104105
chmod 600 ./keys/hansel-key-*.pub
@@ -109,10 +110,15 @@ jobs:
109110
cat sshd-config-test.txt
110111
ps -e | grep sshd
111112
113+
- name: Can ssh connect?
114+
working-directory: ./wolfssh/
115+
run: |
116+
echo exit | ssh -vvv -p 22222 -o "StrictHostKeyChecking no" -i $PWD/keys/hansel-key-ecc.pem $USER@127.0.0.1
117+
112118
- name: Can sftp connect?
113119
working-directory: ./wolfssh/
114120
run: |
115-
echo exit | sftp -vvv -P 22222 -o "StrictHostKeyChecking no" -i ./keys/hansel-key-ecc.pem $USER@127.0.0.1
121+
echo exit | sftp -vvv -P 22222 -o "StrictHostKeyChecking no" -i $PWD/keys/hansel-key-ecc.pem $USER@127.0.0.1
116122
117123
- name: Run SFTP client benchmark
118124
working-directory: ./wolfssh/

0 commit comments

Comments
 (0)