Skip to content

Egress Forwarding to Github via SSH

Valtix Gateway is now configured to accept traffic on port 22 from any source. You will now run a git clone from the EC2 instance and check the logs. The steps take you through the following steps: 1. Fork a sample repo to your github account 1. Generate SSH keys on the EC2 instance 1. Setup the sample repo with the SSH key 1. Clone the repo

If you already know how to setup SSH keys and clone a repo, skip these steps and do a git clone on the EC2 instance

  1. SSH to the EC2 instance created in the spoke1-vpc
  2. Generate SSH keys on the EC2 instance ssh-keygen -f .ssh/id_rsa -q -t rsa -N ''
  3. Login to your github account
  4. Click here to fork valtix-security/egress-hello-world repo from Valtix
  5. Select the account where the fork should be done
  6. Once the fork is complete, the repo main page opens
  7. Click the Settings tab and click on the Deploy keys in the settings page
  8. Click Add deploy key
  9. Provide a name to this key (e.g ec2-instance)
  10. From the EC2 instance get the contents of the SSH public key and copy/paste in the text box on github
    1. cat .ssh/
    2. Copy the contents and paste in the text box on github
    3. Save the key
  11. On github, click the Code tab
  12. Find the link to clone using SSH
    1. Click the Code dropdown
    2. Select SSH
    3. Copy the clone command
  13. On the EC2 instance git clone <replace-with-copied-clone-command>
  14. Make sure the repo name in git clone looks like
  15. git clone should succeed
  16. On the Valtix Dashboard go to Investigate -> All Events
  17. Select the Gateway at the top
  18. Check that the logs show up in the table
  19. Check the Rule ID column and verify that it show the rule name that was configured (any-egress-ssh)