With Loopback, you can run shell commands directly from messaging applications like Telegram, Whatsapp, Discord, etc.
It is handy for cases where you are connecting through a limited network, for example, during flights or while roaming, and whenever you need a terminal, but you are not near a computer.
* If you want to connect your own machine follow the instructions here: Loopbackd
- The first command starts a new virtual machine
- The content of the virtual machine persisted between the different commands
- After 15 minutes of inactivity the machine stops automatically (Longer idle time is available in our paid plans)
/destroystops the machine and erases all the data
/ctrldare available for terminating long running processes
- Subsequent commands after
/destroyresume the virtual machine automatically
- Uploading files is possible by sending a file in the chat, files are automatically stored in
- Downloading files from the virtual machine with
/download [file path]
Find yourself in the need for a quick coding session? you can start a python interpreter easily.
$ python3 >>> print("Hello World!") >>> quit()
Docker can also be used on the VM.
$ sudo apt -q -y install docker.io $ sudo docker run hello-world
Access remote database with psql
Need to run a quick sql query on your server? no problem.
$ sudo apt -q -y install postgresql-client $ psql postgres://reader:NWDMCE5xdipIjRrp@hh-pgsql-public.ebi.ac.uk:5432/pfmegrnargs << EOF $ select dbid, created, last from xref limit 5; $ EOF
Basic text editing
Let's say that you need to update a configuration file on the go, and you don't have access to any computer.
$ sudo apt -q -y install git $ git clone https://github.com/loopbackai/example-scripts.git $ sed -i 's/Good-bye./goodbye/g' example-scripts/eliza.py
Download configuration file from S3
Accessing AWS resources is possible with awscli.
$ curl -s "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" $ sudo apt -q -y install unzip && unzip -q awscliv2.zip $ sudo ./aws/install $ aws s3 cp s3://somebucket/configuration.txt configuration.txt
Serve a file or directory over https with Ngrok
Very simple python-based HTTP server for demonstration purposes.
$ curl -s https://ngrok-agent.s3.amazonaws.com/ngrok.asc | sudo tee /etc/apt/trusted.gpg.d/ngrok.asc >/dev/null && echo "deb https://ngrok-agent.s3.amazonaws.com buster main" | sudo tee /etc/apt/sources.list.d/ngrok.list && sudo apt update && sudo apt install ngrok $ mkdir test_server $ cd test_server && echo "Hello World" >> index.html $ python3 -m http.server 8080 & $ ngrok -log=stdout 8080 > /dev/null &
Setup tailscale to access a remote machine via ssh
Tailscale is a "zero config" VPN service, Tailscale is pre-installed on the VM, so you just need to start it and you are ready to go
$ sudo tailscale up $ tailscale ssh someuser@somehost
$ sudo apt -q -y install cowsay $ cowsay hello Loopback.ai
Wake On Lan
Waking up a remote machine.
$ sudo apt -y -q wakeonlan $ wakeonlan -i [remote ip] [NIC mac address]
$ sudo apt -y -q dnsutils $ dig www.google.com
Run a python script from Github
python3 <(curl -s https://raw.githubusercontent.com/loopbackai/example-scripts/master/eliza.py)
Share with us your examples, at our Discord channel.