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. E: 无法获得锁 /var/cache/apt/archives/lock - open (11 资源临时不可用)

    事件: 今软件包有更新,进入更新管理器,点击安装更新,出现错误. 错误提示: E: 无法获得锁 /var/cache/apt/archives/lock - open (11 资源临时不可用) E: ...

  2. spring boot 使用velocity模板(十六)

    (不要使用这种模板了,spring boot最新版已经不支持了.使用FreeMarker吧:http://blog.csdn.net/clementad/article/details/5194262 ...

  3. <NET CLR via c# 第4版>笔记 第7章 常量和字段

    7.1 常量 常量 是值从不变化的符号.定义常量符号时,它的值必须能够在编译时确定. 只能定义编译器识别的基元类型的常量,如果是非基元类型,需把值设为null. 常量的值直接嵌入代码,所以不能获取常量 ...

  4. gson-2.2.api简单

    使用gson的tojson和fromjson实现对象和json的转换 Gson gson = new Gson(); // Or use new GsonBuilder().create();     ...

  5. git一键提交修改文件

    git一键提交修改文件 首先安装git, 有git bash: 新建一个gitcmt文件,放置于与你的项目同级的目录里: 使用:打开git bash, 方法1. git pull\git status ...

  6. 关于React setState的实现原理(一)

    前言 首先在学习react的时候就对setSate的实现有比较浓厚的兴趣,那么对于下边的代码,可以快速回答吗? class Root extends React.Component { constru ...

  7. MySQL数据引擎InnoDB和MyISAM互相转换

    MySQL(或者社区开源fork的MariaDB)5.5以上支持InnoDB引擎,并将其作为默认数据库引擎.InnoDB带来很多改进,但是对系统资源占用明显增加,对于还在128MB-512MB内存VP ...

  8. 爸妈才是最好的避孕药--------"北大状元拉黑父母事件的一些感想"

    今天看了这么一篇文章,地址:  http://mini.eastday.com/mobile/180131180318786.html <北大状元拉黑父母6年:你敢恨爸妈,可你敢原谅他们吗?&g ...

  9. test20181018 B君的第一题

    题意 分析 考场爆零做法 考虑dp,用\(f(i,j,0/1)\)表示i及其子树中形成j个边连通块的方案数,其中i是否向外连边. \(O(n^3)\),转移方程太复杂就打挂了. #include< ...

  10. 打造基于jQuery的智能选择输入框

    UPDATE:修正了在FireFox下显示的问题,重新copy CSS即可 写完这个名字忽然觉得有点标题党的嫌疑,但是又不知道什么样的名字比较合适,那就暂且这样吧. 今天要讲的东西比较简单,其中会用到 ...