p2pssh is based on libp2p which is easily to connect to other machines, whether or not there is a public IP
go get .
./build.sh
wany@WANY:~/go/src/github.com/wanyvic/p2pssh$ ./p2pssh help
A Distributed Secure Shell
Usage:
p2pssh [flags]
p2pssh [command]
Available Commands:
connect A brief description of your command
daemon A brief description of your command
help Help about any command
login A brief description of your command
ping A brief description of your command
Flags:
--config string config file (default is $HOME/.p2pssh.yaml)
-h, --help help for p2pssh
-l, --log-level string Set the logging level ("debug"|"info"|"warn"|"error"|"fatal") (default "info")
Use "p2pssh [command] --help" for more information about a command.
p2pssh must have a deamon process to link another peer
wany@WANY:~/go/src/github.com/wanyvic/p2pssh$ ./p2pssh daemon
Your PeerID is :Qmb3Tn7SPGxXn7ENagQUY9mVwhNqhr8Ac4C9mWiDqrrbST
Listen:[/ip4/127.0.0.1/udp/9000/quic /ip4/192.168.0.133/udp/9000/quic /ip4/172.17.0.1/udp/9000/quic]
wany@WANY:~/go/src/github.com/wanyvic/p2pssh$ ./p2pssh ping Qmb3Tn7SPGxXn7ENagQUY9mVwhNqhr8Ac4C9mWiDqrrbST
ping took: 35.50429ms
ping took: 33.223504ms
ping took: 34.923255ms
ping took: 33.357161ms
ping took: 38.924518ms
ping took: 34.280522ms
ping took: 32.667023ms
ping took: 34.534543ms
wany@WANY:~/go/src/github.com/wanyvic/p2pssh$ ./p2pssh login wany@Qmb3Tn7SPGxXn7ENagQUY9mVwhNqhr8Ac4C9mWiDqrrbST
Password: //input your password
wany02@WANY02:~$
wany@WANY:~/go/src/github.com/wanyvic/p2pssh$ ./p2pssh connect ls
QmdQERFyHXZE4mBUuSrjbcuicRrmrQk4BB6uTAfiFWWjvq
./p2pssh connect add /ip4/119.3.66.159/udp/9000/quic/p2p/QmdQERFyHXZE4mBUuSrjbcuicRrmrQk4BB6uTAfiFWWjvq
Connected successfully
wany@WANY:~/go/src/github.com/wanyvic/p2pssh$ ./p2pssh connect rm QmdQERFyHXZE4mBUuSrjbcuicRrmrQk4BB6uTAfiFWWjvq
Connection Disconnect successfully