Standalone SSH server for Windows
PyRexecd is a standalone SSH server for Windows.
> pip install pyrexecd
PyRexec.pyw
. AppData\Roaming\PyRexecd
).> copy your\id_ed25519.pub authorized_keys
PyRexec.pyw
to start the server.$ ssh -p 2200 windows
> pyrexecd.exe [-d] [-l logfile] [-s sshdir] [-L addr] [-p port]
[-c cmdexe] [-u username] [-a authkeys] [-h homedir]
ssh_host_key ...
-d
: Turns on Debug mode (verbose logging).-l logfile
: Log file path (default: pyrexecd.log
).-s sshdir
: Config directory path. (default: AppData\Roaming\PyRexecd
)-L a.b.c.d
: Specifies the listen address (default: 127.0.0.1
).-p port
: Specifies the listen port (default: 2200
).-c cmdexe
: cmd.exe path. (default: cmd.exe
)-u username
: Username.-a authkeys
: authorized_keys path. (default: authorized_keys
)-h homedir
: Home directory path. (default: %UserProfile%
)Certain SSH command is recognized as special commands:
@clipget
: Receives the clipboard text from Windows.$ ssh windows @clipget > clipboard.txt
@clipset
: Sends the clipboard text to Windows.$ echo foo | ssh windows @clipset
@open
, @edit
, and @print
: Windows shell operation.
The target pathname should be given from stdin.$ echo C:\User\euske\foo.txt | ssh windows @edit
> pip install cx_Freeze
> python setup_exe.py build