-
Notifications
You must be signed in to change notification settings - Fork 0
Protocol Runner
We need some tolls to open the remote sessions, these tools we call the Protocol Runner
.
Currently, PRemoteM offering some built-in runner for all of the supported protocols:
- RDP Runner based on Remote Desktop ActiveX control
- SSH Runner is KiTTY,
- VNC Runner based on VNCSharp
- SFTP Runner based on SSH.NET
- FTP Runner based on FluentFTP
Of course, you can also customize the initiator for some protocol
PRemoteM supports custom external runner
, as long as the external program supports passing parameters through command line or environment variables, you can start them with PRemoteM.
To demonstrate, here we add WinSCP as a SFTP runner.
WinSCP is a free SFTP, SCP, Amazon S3, WebDAV, and FTP client for Windows, it can open new session through command line.
winscp.exe sftp://username:password@example.com:22/
winscp.exe ftps://username:password@ftp.example.com/
-
First you have to install WinSCP on your computer;
-
In the setting page of PRemoteM,click
Protocol
->SFTP
->+
, and input the name of your new Runner;
-
Click
select
button, select WinSCP.exe path -
Click
i
button, the Macros will be prompted.
- Set CMD parameter
since the demo is sftp://username:password@example.com:22/
then we set parameter to sftp://%PRM_USERNAME%:%PRM_PASSWORD%@%PRM_HOSTNAME%:%PRM_PORT%
- Change the default Runner to WinSCP
- Then all the SFTP session will be opened by WinSCP
启动会话时我们需要一个工具来将配置转化为会话,这个工具我们称之为 Protocol Runner
。
例如目前 PRemoteM 内置了许多 Protocol Runner
- RDP 的 Runner 基于 Remote Desktop ActiveX control 开发
- SSH 的 Runner 是 KiTTY,
- VNC 的 Runner 基于 VNCSharp 开发
- SFTP 的 Runner 基于 SSH.NET 开发
- FTP 的 Runner 基于 FluentFTP 开发...
当然你也可以为某些协议自定义启动器
现在,PRemoteM 支持自定义外部 Runner
,只要外部程序支持通过命令行或环境变量传递参数,你就可以用 PRemoteM 来启动它们。
例如 SSH 协议中,PuTTY 可以通过命令 "putty.exe username@192.168.1.100 -pw mypassword",启动一个 SSH 会话,因此 PuTTY 可以作为 PRemoteM 的外置 Runner。
为演示如何定制自己的 Runner,我们将添加 WinSCP 作为 sftp 的 Runner
WinSCP 是一款开源图形化 SFTP 客户端,支持通过命令行开启会话
winscp.exe sftp://username:password@example.com:22/
winscp.exe ftps://username:password@ftp.example.com/
-
首先在你的电脑上安装 WinSCP 软件;
-
打开 PRemoteM 的设置界面,依次选择
协议
-> “SFTP” -> "+",并输入 Runner 名称;
-
点击 “选择” 按钮,选择 WinSCP.exe 的程序路径
-
点击 “i” 按钮,查看弹出的全局变量名称
- 将 WinSCP 命令行参数中对应的项目改为全局变量
即 sftp://username:password@example.com:22/
改为 sftp://%PRM_USERNAME%:%PRM_PASSWORD%@%PRM_HOSTNAME%:%PRM_PORT%
- 将命令参数填入输入框,然后在顶部下拉栏中把默认 Runner 改为 WinSCP 即可。
- 之后 SFTP 将通过 WinSCP 程序启动
here are some supported runner we found:
APP | Type | Arguments |
---|---|---|
WinSCP | SFTP | sftp://%PRM_USER_NAME%:%PRM_PASSWORD%@%PRM_ADDRESS%:%PRM_PORT% |
FileZilla FTP | SFTP | sftp://%PRM_USERNAME%:%PRM_PASSWORD%@%PRM_HOSTNAME% |
FileZilla FTP | FTP | ftp://%PRM_USERNAME%:%PRM_PASSWORD%@%PRM_HOSTNAME% |
Kitty | SSH | -ssh %PRM_HOSTNAME% -P %PRM_PORT% -l %PRM_USER_NAME% -pw %PRM_PASSWORD% -%PRM_SSH_VERSION% -cmd ""%PRM_STARTUP_AUTO_COMMAND%"" |
TightVNC | VNC | %PRM_HOSTNAME%::%PRM_PORT% -password=%PRM_PASSWORD% -scale=auto |
UltraVNC | VNC | %PRM_HOSTNAME%:%PRM_PORT% -password %PRM_PASSWORD% |