When installing large packages like Cloud Foundry PaS or Kubernetes, it is much faster to use a jumpbox in the same cloud to download and upload the code. Espscially when access to code requires a website login. Usually you create a MS Windows VM and fight with MS edge to download Google Chrome. Here is a method for a Linux jumpbox with web browser.

Create Jumpbox with VNC Server

Put this script in user data to install a desktop, web brower, and vnc on Ubuntu Server. Note this is using the ubuntu user. You can change if you plan on a different username. Also change password in the echo line.

#!/usr/bin/env bash
apt-get update
apt-get upgrade -y
apt-get install -y mate-desktop tightvncserver mate-session-manager mate-terminal chromium-browser autocutsel unzip zip
cat <<EOF > /etc/systemd/system/vncserver@.service 
[Unit]
Description=Start TightVNC server at startup
After=syslog.target network.target

[Service]
Type=forking
User=ubuntu
PAMName=login
PIDFile=/home/ubutnu/.vnc/%H:%i.pid
ExecStartPre=-/usr/bin/tightvncserver -kill :%i > /dev/null 2>&1
ExecStart= /usr/bin/tightvncserver -depth 24 -geometry 1280x800 :%i
ExecStop= /usr/bin/tightvncserver -kill :%i

[Install]
WantedBy=multi-user.target
EOF

mkdir -p /home/ubuntu/.vnc
echo 'w?Y??D' > /home/ubuntu/.vnc/passwd
chmod 600 /home/ubuntu/.vnc/passwd

cat <<EOF > /home/ubuntu/.vnc/xstartup 
#!/usr/bin/env bash
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
export XKL_XMODMAP_DISABLE=1

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
#vncconfig -iconic &
autocutsel -fork &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
x-window-manager &
/usr/bin/mate-session &
EOF
chmod 700 /home/ubuntu/.vnc/xstartup 
chown -R ubuntu:ubuntu /home/ubuntu/.vnc
systemctl daemon-reload
systemctl enable vncserver@1.service
systemctl start vncserver@1
systemctl status vncserver@1

More ideas are availible from Digtal Ocean amnd Mint.

Connecting to the session

Use an ssh tunnel to connect to the jumpbox. On your workstation

ssh -L 5901:127.0.0.1:5901 -N -f -l ubuntu -i deploy.pem ubuntu@ec2-18-217-70-116.us-east-2.compute.amazonaws.com

Then connect with a VNC client to localhost:5901.

The password is c1oudc0w. Use vncpasswd to change.

This website uses cookies to ensure you get the best experience on our website. Learn more Got it