Skip to content

tests: pick a random port number for SSH - #5273

Closed
bagder wants to merge 1 commit into
masterfrom
bagder/tests-ssh-randomport
Closed

tests: pick a random port number for SSH#5273
bagder wants to merge 1 commit into
masterfrom
bagder/tests-ssh-randomport

Conversation

@bagder

@bagder bagder commented Apr 20, 2020

Copy link
Copy Markdown
Member

Since sshd doesn't have such an option by itself, we iterate over a
series of random ports until one works.

Since sshd doesn't have such an option by itself, we iterate over a
series of random ports until one works.

Closes #5273
@bagder
bagder force-pushed the bagder/tests-ssh-randomport branch from e925814 to ec1442d Compare April 21, 2020 11:21
@bagder

bagder commented Apr 21, 2020

Copy link
Copy Markdown
Member Author

When trying out this method, I spotted that it doesn't work on Cirrus-CI. I then went back and noticed that the SSH server was never started/used fine on Cirrus so this isn't new with this PR. The reason seems to be that the "verification" of the server with the sftp command fails. This is the hint in the sftp server log:

debug2: channel_input_status_confirm: type 99 id 0
debug2: subsystem request accepted on channel 0
Received message too long 1416128883

According to sources "on the internet" this (the "message too long") is typically the result of the user having /sbin/nologin or similar as shell in /etc/passwd.

@mback2k
mback2k self-requested a review April 21, 2020 17:05
@mback2k

mback2k commented Apr 21, 2020

Copy link
Copy Markdown
Member

Please give me a chance to test this locally on Windows before merging. I will try to do that now.

@mback2k

mback2k commented Apr 21, 2020

Copy link
Copy Markdown
Member

I haven't got the SSH tests working on Windows again yet, regardless of this PR. I will retry tomorrow.

@mback2k mback2k left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is passing my local tests on Windows 👍 (after #5298 was applied)

@bagder

bagder commented Apr 26, 2020

Copy link
Copy Markdown
Member Author

Awesome, thanks @mback2k! I'll merge this and the stunnel fix (#5267) after the pending release.

@bagder bagder self-assigned this Apr 26, 2020
@mback2k mback2k added the feature-window A merge of this requires an open feature window label Apr 27, 2020
@bagder bagder closed this in d1239b5 Apr 30, 2020
@bagder
bagder deleted the bagder/tests-ssh-randomport branch April 30, 2020 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature-window A merge of this requires an open feature window SCP/SFTP tests

Development

Successfully merging this pull request may close these issues.

2 participants