Skip to content

Instantly share code, notes, and snippets.

@jonathanhle
Forked from guillochon/ssh-airplane-wifi.md
Created March 8, 2024 23:56
Show Gist options
  • Save jonathanhle/89327b098e2c337f2277ee7633ec0418 to your computer and use it in GitHub Desktop.
Save jonathanhle/89327b098e2c337f2277ee7633ec0418 to your computer and use it in GitHub Desktop.

Revisions

  1. @guillochon guillochon revised this gist Jan 29, 2018. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions ssh-airplane-wifi.md
    Original file line number Diff line number Diff line change
    @@ -5,6 +5,7 @@ An easy (and free) way to do this is via a Google free-tier micro instance.
    These instances have a 1 GB transfer ceiling per month, but so long are you are only transmitting textual data a few days per month, this limit should not be easily exceeded.
    Set up one of these VMs via the [Google Cloud console](https://console.cloud.google.com), and select CentOS 7 as the disk image.
    *Make sure that you allow http/https traffic on the instance, the two checkboxes in the Firewalls section of the VM settings.*
    Optionally, set a static external IP address for your server in the VM config, in case you don't want to look up the IP each time.
    Then, ssh into the new VM (the IP address will be listed as the "external IP" in the list of instances) and edit your `/etc/ssh/sshd_config` file, changing the `Port 22` line to `Port 80`.

    By default selinux will only allow the SSH service to use port 22, so you have to change your selinux permissions as well.
  2. @guillochon guillochon revised this gist Jan 29, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion ssh-airplane-wifi.md
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,7 @@ An easy (and free) way to do this is via a Google free-tier micro instance.
    These instances have a 1 GB transfer ceiling per month, but so long are you are only transmitting textual data a few days per month, this limit should not be easily exceeded.
    Set up one of these VMs via the [Google Cloud console](https://console.cloud.google.com), and select CentOS 7 as the disk image.
    *Make sure that you allow http/https traffic on the instance, the two checkboxes in the Firewalls section of the VM settings.*
    Then, ssh into the new VM and edit your `/etc/ssh/sshd_config` file, changing the `Port 22` line to `Port 80`.
    Then, ssh into the new VM (the IP address will be listed as the "external IP" in the list of instances) and edit your `/etc/ssh/sshd_config` file, changing the `Port 22` line to `Port 80`.

    By default selinux will only allow the SSH service to use port 22, so you have to change your selinux permissions as well.
    Enter the following commands into the VM:
  3. @guillochon guillochon revised this gist Jan 29, 2018. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions ssh-airplane-wifi.md
    Original file line number Diff line number Diff line change
    @@ -4,6 +4,7 @@ If you want to SSH, you have to set up an intermediate machine that hosts the SS
    An easy (and free) way to do this is via a Google free-tier micro instance.
    These instances have a 1 GB transfer ceiling per month, but so long are you are only transmitting textual data a few days per month, this limit should not be easily exceeded.
    Set up one of these VMs via the [Google Cloud console](https://console.cloud.google.com), and select CentOS 7 as the disk image.
    *Make sure that you allow http/https traffic on the instance, the two checkboxes in the Firewalls section of the VM settings.*
    Then, ssh into the new VM and edit your `/etc/ssh/sshd_config` file, changing the `Port 22` line to `Port 80`.

    By default selinux will only allow the SSH service to use port 22, so you have to change your selinux permissions as well.
  4. @guillochon guillochon revised this gist Jan 29, 2018. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion ssh-airplane-wifi.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,8 @@
    # Using SSH through airplane WiFi
    # Using SSH through airplane WiFi that blocks port 22
    Many aircraft that offer wifi only permit access to machines on port 80/443, the standard http(s) ports.
    If you want to SSH, you have to set up an intermediate machine that hosts the SSH service on either port 80 or 443.
    An easy (and free) way to do this is via a Google free-tier micro instance.
    These instances have a 1 GB transfer ceiling per month, but so long are you are only transmitting textual data a few days per month, this limit should not be easily exceeded.
    Set up one of these VMs via the [Google Cloud console](https://console.cloud.google.com), and select CentOS 7 as the disk image.
    Then, ssh into the new VM and edit your `/etc/ssh/sshd_config` file, changing the `Port 22` line to `Port 80`.

  5. @guillochon guillochon revised this gist Jan 29, 2018. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion ssh-airplane-wifi.md
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,8 @@ Many aircraft that offer wifi only permit access to machines on port 80/443, the
    If you want to SSH, you have to set up an intermediate machine that hosts the SSH service on either port 80 or 443.
    An easy (and free) way to do this is via a Google free-tier micro instance.
    Set up one of these VMs via the [Google Cloud console](https://console.cloud.google.com), and select CentOS 7 as the disk image.
    Then, ssh into the new VM and edit your `/etc/ssh/sshd_config` file, changing the `Port 22` to `Port 80`.
    Then, ssh into the new VM and edit your `/etc/ssh/sshd_config` file, changing the `Port 22` line to `Port 80`.

    By default selinux will only allow the SSH service to use port 22, so you have to change your selinux permissions as well.
    Enter the following commands into the VM:
    ```
  6. @guillochon guillochon revised this gist Jan 29, 2018. 1 changed file with 27 additions and 1 deletion.
    28 changes: 27 additions & 1 deletion ssh-airplane-wifi.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,29 @@
    # Using SSH through airplane WiFi
    Many aircraft that offer wifi only permit access to machines on port 80/443, the standard http(s) ports.
    If you want to SSH, you have to set up an intermediate machine that hosts the SSH service on either port 80 or 443.
    An easy (and free) way to do this is via a Google free-tier micro instance. Set up one of these services via the Google Cloud console
    An easy (and free) way to do this is via a Google free-tier micro instance.
    Set up one of these VMs via the [Google Cloud console](https://console.cloud.google.com), and select CentOS 7 as the disk image.
    Then, ssh into the new VM and edit your `/etc/ssh/sshd_config` file, changing the `Port 22` to `Port 80`.
    By default selinux will only allow the SSH service to use port 22, so you have to change your selinux permissions as well.
    Enter the following commands into the VM:
    ```
    sudo su
    semanage port -m -t ssh_port_t -p tcp 80
    firewall-cmd --permanent --zone=public --add-port=80/tcp
    firewall-cmd --reload
    systemctl restart sshd.service
    ```
    Make sure that SSH is listening on port 80:
    ```
    ss -tnlp | grep ssh
    ```
    Example output:
    ```
    LISTEN 0 128 *:80 *:* users:(("sshd",pid=1895,fd=3))
    LISTEN 0 128 :::80 :::* users:(("sshd",pid=1895,fd=4))
    ```
    If so, log out and attempt to SSH into your server on the new port:
    ```
    ssh 123.45.67.89 -p80
    ```
    And you're done! Happy SSHing!
  7. @guillochon guillochon created this gist Jan 29, 2018.
    3 changes: 3 additions & 0 deletions ssh-airplane-wifi.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    Many aircraft that offer wifi only permit access to machines on port 80/443, the standard http(s) ports.
    If you want to SSH, you have to set up an intermediate machine that hosts the SSH service on either port 80 or 443.
    An easy (and free) way to do this is via a Google free-tier micro instance. Set up one of these services via the Google Cloud console