Access and Control Remote Computers
Different Types of Remote Access and Support with ButConnect
The following examples show some of the the numerous possibilities when using ButConnect.
Start Simple
The easiest way to get started with ButConnect is to launch it with a double click. (On systems
other than Windows, you might need to create a ‘starter’ first.)
It's not necessary to pass any parameters or command line arguments since everything can be controlled interactively. Just select the mode of operation and
follow the instructions that appear on your screen.
Test Connection
For testing purposes, you can connect to yourself. Therefore, execute ButConnect twice and run it in client mode as well as in agent mode on the same computer.
Remote Control (basic)
Use the interactive mode on both client and agent host — just launch ButConnect.exe and follow the instructions.
Default Client Mode
On the client host:
(client)> ButConnect.exe
Press [Return] to confirm client mode and then tell the username and link that appear on your screen to your agent.
Default Agent Mode
On the agent host:
(agent)> ButConnect.exe
Press [A] (or type ‘agent’) for agent mode followed by [Return] and then enter the credentials (username and link) that you received from your client and the code that you get from our website (as the ButConnect output states).
On Windows hosts VNC server and viewer will start automatically.
On other systems you can connect to a VNC server listening on port 5900 of the client machine by
calling:
(agent)> vncviewer
127.0.0.1:1024
on the agent machine (or choose another way to access the remote system manually).
File Transfer
On the client host:
(client)> ButConnect.exe
--download=myDoc.pdf
On the agent host:
(agent)> ButConnect.exe
--upload=someDoc.pdf
Then enter the username, link and code.
Both commands together will transfer the PDF file and then quit.
Chat Mode
On the client host:
(client)> ButConnect.exe
-ca
On the agent host:
(agent)> ButConnect.exe
-ac --user=<user>
--link=<link>
Then enter the code.
You can chat to each other as soon (and as long) as both communication partners are connected.
Remote Control (advanced)
On the client host (the remote end in relation to the remote access session):
(client)> ButConnect.exe
--remote=5900
On the agent host (the local end in relation to the remote access session):
(agent)> ButConnect.exe
--local=5599 --user=<user> --link=<link>
--code=<code>
Both commands together provide access to a VNC server listening on port 5900 of the client machine
and thus allow you to remotely control that host by calling
(agent)> vncviewer
127.0.0.1:5599
on the agent machine.
You can choose whatever “loop” and “hook” you need for your use case. For
instance, loop 22 (instead of 5900) lets you ssh into the remote host, whereas loop 3389 enables you
to control the client station via the remote desktop protocol (RDP).
(If your RDP client refuses to connect to ‘127.0.0.1’, it might be necessary to set the
“source address” — see below — to some other local host
address, such as ‘127.0.0.2’, and connect to that address.)
However, be sure to select a hook (that's not already in use) from 1024 and above or run
ButConnect with
administrative privileges.
Remote Access (tunneled connection)
On the client host:
(client)> ButConnect.exe -p=443
--target=192.168.1.100 --loop=22
(‘192.168.1.100’ is the “target host” in the remote net.)
On the agent host:
(agent)> ButConnect.exe -p=443
--source=172.16.1.10 --hook=2222 --user=<user>
--link=<link> --code=<code>
(‘172.16.1.10’ is the “source address” of the agent host in the local net that now acts as a proxy.)
Both commands together provide access to a secure shell server at host ‘192.168.1.100’
(which is not the client machine in this example) from some host in the 172.16.x.y-network (which is
not the agent machine in this example) by calling
(host)> ssh -p 2222
jdoe@172.16.1.10
on that host.
The agent host (172.16.1.10) needs to accept connections to the selected socket (address and port, i.e. “source” and “hook” or in this example ‘172.16.1.10’ and ‘2222’)
The connection to the broker is here explicitly made by using port 443 (which is the default) so nothing should be blocked by the firewalls. Other available ports are 80, 53 and 22. You can use different ports for client and agent.
This mode is particularly useful for connecting to a Dell iDRAC, Fujitsu iRMC or HPE iLO remote management web interface and its remote console. (To successfully access a remote console, you may need to make connections to multiple ports.)
Host Mode (for unattended operation)
First, get your keys and configuration file.
On the client host (i.e., the client's server):
(client)> ButConnect.exe
-x -i=client.key -r=5900
--user=<client_user> --link=<link>
--code=<client_code>
On the agent host (i.e., the agent's workstation):
(agent)> ButConnect.exe
-x -i=agent.key -l=1024
--user=<agent_user> --link=<link>
--code=<agent_code>
If you run those commands from a script or batch file, ButConnect will listen on the client side and it will connect on the agent side without any further interaction.
Using the systemd mechanism
A more sophisticated way to start ButConnect automatically on Linux is by utilizing the systemd mechanism:
(Execute systemctl daemon-reload and systemctl enable butconnect.service and then systemctl start butconnect.service after adding the service.)
Host Mode (auto reconnect)
Again, get your keys and configuration file.
On the client host (server):
(client)> ButConnect.exe
-w -i=client.key -r=5900 --user=<client_user> --link=<link>
--code=<client_code>
On the agent host (workstation):
(agent)> ButConnect.exe
-w=10 --limit=3 -i=agent.key -l=1024
--user=<agent_user> --link=<link> --code=<agent_code>
On the server ButConnect will continuously try to reconnect once every 5 minutes. On the workstation ButConnect will wait for 10 minutes between 3 attempts to reconnect and then quit if those fail.
Using Configuration Files
On either side the desired configuration can be selected by specifying the appropriate configuration file and/or section on
the command line:
(host)> ButConnect.exe
-cf=<filename> -cn=<section>
In interactive mode the connection can also be selected by typing ‘cf’ or ‘cn’ when prompted for a mode and then giving the name of the configuration file and/or section.