This is a simple project to learn how to interact with the Raspberry PI/VPS through SSH using a Rust application.
Usage: [OPTIONS] [COMMAND]
test
action reboot
action shutdown
control update
file upload {file} {destination}
file download {file} {destination}
action view {file}
info hardware
info memory
info partitions
info cpu
info temperature
info uptime
info version
info pwd
info du {directory}
install nginx
Example: cargo run -- --user=pi --host=192.168.178.225 info temperature
Example .\rust-ssh-demo.exe --public-key=../../.ssh/id_rsa.pub --private-key=../../.ssh/id_rsa info temperature
You can pass the following optional arguments to the application:
--host
- The host to connect to--port
- The port to connect to--user
- The user to connect as--public-key
- The path to the public key file--private-key
- The path to the private key file
By default the application will use the values defined in the .env
file.
You can get help by running the application with the --help
or -h
flag.