Using esh you can interact with a remote machine without opening an interactive shell. Users can run commands on a remote machine without the need to ssh into the remote machine, it stays running in the background to keep the connection open.
esh runs your command on a remote machine by reading your args
and printing back stdout
and stderr
Show context-sensitive help (also try --help-long and --help-man).
Shows help for the specified command.
Adds a SSH session to config.
Use a specific ssh session.
List all saved SSH sessions.
Logout from the current session.
Remove a given session using a name.
Get some file or folder.
Put some file or folder.
cd $PROJECT_ROOT/src
docker run -it --rm -v `pwd`:/go/src/esh -w /go/src/esh golang bash
# In docker shell now...
go get
env GOOS=darwin GOARCH=386 go build -o ../bin/esh -v *.go
- Fix any bugs, there are a few. The following is an example:
- we get crashes if we try to upload/download files that don't exist (#1)
- Optimize download and upload code to transfer files faster.
- Using the
sftp
library has made the download speed exponentially slower than the upload speed. Downloading by opening a reverse SSH connection and then uploading from the server to the computer maybe be a potential solution, needs to be explored.
-
One way of potentially increasing the speed might be to create a separate background daemon program that keeps ssh connections alive and another main program that uses the 'open' ssh connections there to contact server/device. The effect is uncertain and needs to be tested before implementing.
-
Opening a
vim
on the local buffer and syncing it with the server so that the files are automatically saved in the server. This would involve fetching and putting of the file between the device and server behind the scenes. For e.g.
esh vim /some/remote/path/to/file
- Open to other directions and suggestions.