-
-
Notifications
You must be signed in to change notification settings - Fork 4
Bastion Container Creation #14
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
Conversation
I updated the testing instructions. Now you should no longer see public key denied error. |
ansible/Dockerfile
Outdated
@@ -56,5 +56,5 @@ ENV ANSIBLE_CONFIG=/etc/ansible/ansible.cfg | |||
EXPOSE 22 | |||
|
|||
# Start SSH service | |||
CMD ["/usr/sbin/sshd", "-D"] | |||
ENTRYPOINT ["/bin/sh", "-c", "ansible-playbook site.yml && /usr/sbin/sshd -D"] |
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.
Please revert this change as we use Ansible for configuration instead of Docker.
bastion/sysadmin-.ssh-config/config
Outdated
IdentityFile /home/sysadmin/.ssh/id_rsa | ||
ForwardAgent yes | ||
|
||
Host db-dev |
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.
please remove db details as we are not managing it
- Host db-dev
- HostName db-dev
- User sysadmin
- identityFile /home/sysadmin/.ssh/id_rsa
- ForwardAgent yes
+
bastion/sysadmin-.ssh-config/config
Outdated
HostName ansible-dev | ||
User sysadmin | ||
IdentityFile /home/sysadmin/.ssh/id_rsa | ||
ForwardAgent yes |
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.
I believe we decided to use ProxyJump, so this needs to be updated accordingly.
something like this
+ Host ansible-dev
+ HostName ansible-dev
+ User sysadmin
+ IdentityFile /home/sysadmin/.ssh/id_rsa
+ ProxyJump bastion
+ Host web-dev
+ HostName web-dev
+ User sysadmin
+ IdentityFile /home/sysadmin/.ssh/id_rsa
+ ProxyJump bastion
+ Host bastion
+ HostName bastion-dev
+ User sysadmin
+ IdentityFile /home/sysadmin/.ssh/id_rsa
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.
Looks good to me, Approved!! ❤️
Fixes
Description
Create a bastion Dockerfile as a jump server
Technical details
The bastion Dockerfile includes:
Tests
docker-compose up
to start the container.ssh-add ./sysadmin-ssh-keys/rsa_sysadmin
ssh -J sysadmin@localhost:22222 sysadmin@web-dev
andssh -J sysadmin@localhost:22222 sysadmin@ansible-dev
to verify the connection through the bastion server. The connection should be successful.Screenshots
Checklist
Update index.md
).main
ormaster
).visible errors.
Developer Certificate of Origin
For the purposes of this DCO, "license" is equivalent to "license or public domain dedication," and "open source license" is equivalent to "open content license or public domain dedication."
Developer Certificate of Origin