-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SSH reliability settings #317
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
758c52b
SSH reliability settings
ab77 e0a03ac
pre-create control masters directory
ab77 cc24c2e
limit to test runners group
ab77 80fe9bb
experiment over ipsec vpn
ab77 94cc717
specify test runner group
ab77 42b9edb
Update tests.yml
ab77 cff01bc
Update tests.yml
ab77 7b800de
Update tests.yml
ab77 12add96
Update tests.yml
ab77 e518f94
try container runner
ab77 afb1428
Update tests.yml
ab77 6361744
try GH runners for a laugh..
ab77 8c7e939
Docker Compose through SSH failing and referring to docker.example.com
ab77 977feac
Update tests.yml
ab77 539adad
SSH reliability settings
ab77 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -798,6 +798,14 @@ jobs: | |
&& rm -f "\${tmphosts}" \ | ||
&& getent hosts api.${{ matrix.subdomain }}.${{ matrix.dns_tld }} | grep 127.0.1.1 | ||
|
||
sshd -T | ||
service ssh restart | ||
|
||
# https://forums.docker.com/t/docker-compose-through-ssh-failing-and-referring-to-docker-example-com/115165/18 | ||
- path: /etc/ssh/sshd_config.d/00-cloud-init | ||
content: | | ||
MaxStartups 100:0:100 | ||
|
||
# cloud-init runs as root | ||
# (e.g.) https://cloudinit.readthedocs.io/en/latest/reference/merging.html#example-cloud-config | ||
runcmd: | ||
|
@@ -839,6 +847,10 @@ jobs: | |
aws ec2 wait instance-running --instance-ids "${instance_id}" | ||
with_backoff aws ec2 wait instance-status-ok --instance-ids "${instance_id}" | ||
|
||
private_ip="$(aws ec2 describe-instances --instance-id "${instance_id}" \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we may want to use this in the future |
||
| jq -r .Reservations[].Instances[].PrivateIpAddress)" | ||
echo "private_ip=${private_ip}" >>"${GITHUB_OUTPUT}" | ||
|
||
env: | ||
ATTEMPTS: 2 | ||
AWS_DEFAULT_REGION: ${{ vars.AWS_REGION || 'us-east-1' }} | ||
|
@@ -876,10 +888,20 @@ jobs: | |
trap 'log_output' EXIT | ||
|
||
# https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started-enable-ssh-connections.html | ||
mkdir -p "${HOME}/.ssh/controlmasters" | ||
cat << EOF > "${HOME}/.ssh/config" | ||
host * | ||
StrictHostKeyChecking no | ||
UserKnownHostsFile /dev/null | ||
|
||
host i-* | ||
StrictHostKeyChecking no | ||
UserKnownHostsFile /dev/null | ||
TCPKeepAlive yes | ||
ServerAliveInterval 5 | ||
ControlPath "${HOME}/.ssh/controlmasters/%r@%h:%p" | ||
ControlMaster auto | ||
ControlPersist 5m | ||
ProxyCommand sh -c "aws ssm start-session --target %h --document-name AWS-StartSSHSession --parameters 'portNumber=%p'" | ||
EOF | ||
|
||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the actual fix