It is possible to run a Windows program as a system service. The advantage of services is that they can be started at boot time independently of any logon session, and will continue to run as users log on and off of the machine.

Frequently users would like to run Bitvise SSH Client as a service so that its port forwarding features would come into effect as soon as the machine boots and remain active regardless of users logging on and off of the machine.

Bitvise SSH Client itself does not run as a service, but it can be encapsulated inside a program that enables this. A few such programs we're aware of are:

  • The srvany utility included with the Windows Resource Kits. Guidance to using the srvany utility can be found in the MS Knowledge Base.
  • FireDaemon by Sublime Solutions. This may be easier to set up than srvany.
  • We have received suggestions for the Non-Sucking Service Manager by Iain Patterson.

Bitvise SSH Client supports command-line parameters which can tell it to load a desired profile and connect to the target server immediately. Information about the SSH client's command-line parameters is available from its log area immediately on start-up, as well as if you run Bitvise SSH Client from the command prompt with the /? parameter:

C:\>BvSsh /?

When configuring Bitvise SSH Client to run as a service this way, it must be set up to run under the Windows account of a user who has already used Bitvise SSH Client to connect to the target SSH server successfully. If this is not done and an arbitrary Windows account or the default Local System account is used, the SSH client will hang on verification of the server's public key fingerprint, and the session will not be established. Likewise, if the server's public key changes, you will need to login interactively into the account under which you are running Bitvise SSH Client as a service, and use the SSH client interactively to connect to the SSH server and verify and save its new public key.

So we choose  NSSM to make it as a window service:

nssm install BitviseSSHClient "D:\BitviseTunnelier\Tunnelier.exe" -profile="D:\BitviseTunnelier\Dev-Proxy-SG.tlp" -hostKeyFile="D:\BitviseTunnelier\Dev-Proxy-SG.hostKeyFile"  -loginOnStartUp 
net start BitviseSSHClient

If you want the remove this service :

nssm remove BitviseSSHClient confirm

or second solution :

0. Make sure you have saved your login and password in Tunnelier and it connects properly when you click Login
1. Find your shortcut icon for Tunnelier (or make one) and copy it on your desktop.
2. Right click on the shortcut and select "Propreties"
3. In the Shortcut tab, you will find a text box to the right of "Target"
4. Copy paste ["C:\Program Files\Bitvise Tunnelier\Tunnelier.exe" -loginOnStartUp], without the [] in the text box.
5. Click apply and exit.
\\now
whenever you click on your edited shortcut, Tunnelier will open in the
background, and login automatically. You will see the icon appear in
your system tray but now new window will open.)
\\we will now make Tunnelier start when Windows starts.
6.
Go in your Start Menu, and find the "Startup" folder. This can be found
by clicking on "All Programs" and scrolling down the list until you
find it, at least in Windows 7 and Vista.
7.Once you found your Startup folder, right click on it and select Explore or Explore All users
\\If
you select Explore, you are only going to affect programs that start up
automatically with the username that you are currently logged in with.
If you select Explore All Users, you will affect that startup of all
users...
8. Copy your edited shortcut of Tunnelier that is placed on your Desktop to the "Startup" folder.
9.Enjoy.

Reference :

Bitvise Tunnelier, a fully featured SSH2 client.
Copyright (C) 2000-2005 by Bitvise Limited.
Portions Copyright (C) 1995-2003 by Wei Dai. The following parameters are currently supported.
-profile=xxx: the profile to open on startup
-host=xxx: the SSH host to connect to, overrides profile
-port=xxx: the port on the SSH host to connect to, overrides profile
-username=xxx: specifies the username to use, overrides profile
-password=xxx: specifies the password to use, overrides profile
-loginOnStartup: instructs Tunnelier to login immediately
-exitOnLogout: instructs Tunnelier to exit after logging out
-hide=xxx: specifies a comma-separated list of functionality to hide
main: Tunnelier's main window
hostKey: host key confirmation dialog
banner: user authentication banner message
auth: user authentication dialog
popups: log popup balloons
trayLog: show log system tray menu
trayWRC: WinSSHD Remote Control system tray menu
trayTerm: open new terminal system tray menu
traySFTP: open new SFTP window system tray menu
trayRDP: open new Remote Desktop system tray menu
trayPopups: log popup settings system tray menu
-menu=xxx: the scope of system tray menu functionality made available
full: allow full access - normal use
small: same as -hide=main,trayWRC,trayTerm,traySFTP,trayRDP
min: same as -menu=small -hide=hostKey,popups,trayLog,trayPopups
-noRegistry: do not load settings from or store them to Windows registry
-proxy=y|n: use a proxy server, overrides global client proxy settings
-proxyType=xxx: the type of proxy server to use
SOCSK4: a SOCKS4 or 4A proxy (default)
SOCKS5: a SOCKS5 proxy
HTTP: a proxy supporting the HTTP CONNECT verb
-proxyServer=xxx: the IP address or DNS name of the proxy server
-proxyPort=xxx: the proxy server port, 1080 by default
-proxyUsername=xxx: proxy server username (SOCKS5 and HTTP only)
-proxyPassword=xxx: proxy server password (SOCKS5 and HTTP only)
-proxyResolveLocally: whether to resolve a DNS name locally before passing it to the proxy
-hostKeyMD5=xxx: MD5 fingerprint of the host key to accept, used additionally to global client host key database
-hostKeyBB=xxx: Bubble-Babble of the host key to accept, used additionally to global client host key database
-hostKeyFile=xxx: a file containing host keys to accept, used additionally to global client host key database
-keypairFile=xxx: a file containing a private key for authentication; overrides keys in global client user keypair database
-keypairPassphrase=xxx: must be present when -keypairFile specifies an OpenSSH encoded and passphrase protected keypair All parameter names are case sensitive.

Running Bitvise SSH Client as a Windows Service的更多相关文章

  1. 利用Bitvise SSH Client设置二级代理

    浏览器设置代理 chrome: 插件:SwitchyOmega 二级代理 软件:Bitvise SSH Client 友情连接:链接: https://pan.baidu.com/s/1fdth_TZ ...

  2. Bitvise ssh client+ chrome +SwitchyOmega *** (xjl456852原创)

    首先这个比ss还要简单,ss还需要在vps上搭建服务器.这个不需要. 但是无论是ss 还是 bitvise 都需要有一个自己的vps才行. 首先打开Bitvise ssh client程序:     ...

  3. Windows最强ssh客户端推荐 —— Bitvise SSH Client

    原名Tunnelier,解除它是因为为了sshFQ,没想到它既有SSH Terminal,又集成SFTP,还能FQ,功能一应区全. 还支持pem证书,回想最初使用putty,还要把pem证书进行转换才 ...

  4. C#中级-Windows Service程序安装注意事项

    一.前言 这周除了改写一些识别算法外,继续我的Socket服务编写.服务器端的Socket服务是以Windows Service的形式运行的. 在我完成Windows Service编写后,启动服务时 ...

  5. 在Windows 10中使用内置的SSH Client连接远程的Linux虚拟机

    无意中发现这个功能.一直以来,在Windows平台上面要通过SSH连接Linux都需要借助第三方工具,而且往往还不是很方便.但其实在去年12月份的更新中,已经包含了一个beta版本的SSH Clien ...

  6. [异常解决] windows用SSH和linux同步文件&linux开启SSH&ssh client 报 algorithm negotiation failed的解决方法之一

    1.安装.配置与启动 SSH分客户端openssh-client和openssh-server 如果你只是想登陆别的机器的SSH只需要安装openssh-client(ubuntu有默认安装,如果没有 ...

  7. Running a Remote Desktop on a Windows Azure Linux VM (远程桌面到Windows Azure Linux )-摘自网络(试了,没成功 - -!)

                              A complete click-by-click, step-by-step video of this article is available ...

  8. WCF Windows Service Using TopShelf and ServiceModelEx z

    http://lourenco.co.za/blog/2013/08/wcf-windows-service-using-topshelf-and-servicemodelex/ There are ...

  9. 使用ASP.NET实现Windows Service定时执行任务

    转载http://blog.csdn.net/yanghua_kobe/article/details/6937816 我们怎样才能在服务器上使用asp.net定时执行任务而不需要安装windows ...

随机推荐

  1. prim和kruskal比较

    推荐:http://squirrelrao.iteye.com/blog/1044867  http://www.cnblogs.com/xwdreamer/archive/2011/06/16/22 ...

  2. POJ 3279 Fliptile 状态压缩,思路 难度:2

    http://poj.org/problem?id=3279 明显,每一位上只需要是0或者1, 遍历第一行的所有取值可能,(1<<15,时间足够)对每种取值可能: 对于第0-n-2行,因为 ...

  3. Newtonsoft.Json JsonHelper

    Json.net 简单封装 using System; using System.Linq; using Newtonsoft.Json; using Newtonsoft.Json.Serializ ...

  4. docker的搭建和简单应用

    dockerserver端安装 先下载docker的yum源 wget http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo ...

  5. HTML 代码常用技巧

    IE Javascript快捷键操作 . oncontextmenu="window.event.returnValue=false" 将彻底屏蔽鼠标右键 <table bo ...

  6. [Tomcat无法启动]'Starting Tomcat v8.0 Server at localhost' has encountered a problem.

    运行一个index.jsp,运行提示如下错误:点击服务器 解决办法1: 点击Tomcat服务器,将服务器里的web工程删除掉,再重新运行index.jsp. 解决办法2: 关闭Tomcat,最简单的方 ...

  7. 接口测试Fiddler实战20150921

    (写好的文章被不小心删掉了,现在补一篇) 项目背景: 1.接口URL:http://192.168.xx.xx:8080/mserver/rest/ms 2.接口参数:data=xxxxx&k ...

  8. 常量池之字符串常量池String.intern()

    运行时常量池是方法区(PermGen)的一部分. 需要提前了解: 1. JVM内存模型. 2. JAVA对象在JVM中内存分配 常量池的好处 常量池是为了避免频繁的创建和销毁对象而影响系统性能,其实现 ...

  9. JAVA使用ItextPDF

    1.背景 在某些业务场景中,需要提供相关的电子凭证,比如网银/支付宝中转账的电子回单,签约的电子合同等.方便用户查看,下载,打印.目前常用的解决方案是,把相关数据信息,生成对应的pdf文件返回给用户. ...

  10. LTE-Advanced(4G)主要技术学习:CA、CoMp、HetNet

    CA:Carrier Aggregation,载波聚合 从LTE到LTE-Advanced演进过程中,更宽频谱的需求是影响演进的最重要因素,为此3GPP标准提出了载波聚合技术.简单地说,它可以将多个载 ...