Skip to content

Instantly share code, notes, and snippets.

@Nachtalb
Created October 26, 2019 17:18
Show Gist options
  • Select an option

  • Save Nachtalb/edb54e6cd4efaa44d364ff82fb9e48e3 to your computer and use it in GitHub Desktop.

Select an option

Save Nachtalb/edb54e6cd4efaa44d364ff82fb9e48e3 to your computer and use it in GitHub Desktop.

Revisions

  1. Nachtalb created this gist Oct 26, 2019.
    26 changes: 26 additions & 0 deletions setup_mosh_centos_6.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    #!/bin/sh

    # Update latest epel
    wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
    rpm -Uvh epel-release-6-8.noarch.rpm
    # Install forenscis tools repository for protobuf-compiler and protobuf-devel
    wget https://forensics.cert.org/cert-forensics-tools-release-el6.rpm
    rpm -Uvh cert-forensics-tools-release-el6.rpm
    # Install openfusion repository for perl-IO-Socket-IP
    wget http://repo.openfusion.net/centos6-i386/openfusion-release-0.7-1.of.el6.noarch.rpm
    rpm -Uvh openfusion-release*rpm

    # Download and build mosh
    yum -y install rpm-build rpmdevtools protobuf-compiler protobuf-devel perl-IO-Socket-IP libutempter-devel zlib-devel ncurses-devel openssh-clients perl-IO-Tty openssl-devel gcc gcc-c++
    rpmdev-setuptree
    cd ~/rpmbuild/SOURCES
    wget http://mosh.mit.edu/mosh-1.2.5.tar.gz
    cd ~/rpmbuild/SPECS
    rm mosh.spec*
    wget https://raw.github.com/keithw/mosh/master/fedora/mosh.spec
    rpmbuild -bb mosh.spec
    ARCH=`uname -m`
    rpm -Uvh ~/rpmbuild/RPMS/${ARCH}/mosh-1.2.5-1.el6.${ARCH}.rpm

    # Set iptables rule
    iptables -A INPUT -p udp -m multiport --dports 60000:61000 -j ACCEPT