<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://vistapedia.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Forum</id>
	<title>VistApedia - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://vistapedia.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Forum"/>
	<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php/Special:Contributions/Forum"/>
	<updated>2026-04-07T20:50:27Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://vistapedia.com/index.php?title=SSH_Tunneling_for_CPRS&amp;diff=4534</id>
		<title>SSH Tunneling for CPRS</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=SSH_Tunneling_for_CPRS&amp;diff=4534"/>
		<updated>2006-12-05T00:08:00Z</updated>

		<summary type="html">&lt;p&gt;Forum: Added the 127.0.0.1 is the normal local ip address.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Marc Krawitz contributed this tutorial to Hardhats.&lt;br /&gt;
It is reproduced here as it appeared on [http://groups-beta.google.com/group/Hardhats/t/e586004c6890f228?hl=en Hardhats@googlegroups.com]. 11/29/2006 9:11 PM&lt;br /&gt;
 &lt;br /&gt;
== [Hardhats] Tutorial on ssh tunneling with CPRS ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It took me all day to figure this out, so I thought I would share.&lt;br /&gt;
The goal here is to enable CPRS to work remotely by communicating over&lt;br /&gt;
the public internet when the target VistA linux server only exposes&lt;br /&gt;
port 22 (ssh).  The channel needs to be (and is) encrypted of course.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
To do this, make the following changes to /etc/ssh/sshd_config on your&lt;br /&gt;
linux server:&lt;br /&gt;
&lt;br /&gt;
 AllowTcpForwarding yes&lt;br /&gt;
 GatewayPorts yes&lt;br /&gt;
 TCPKeepAlive yes&lt;br /&gt;
 ClientAliveInterval 10&lt;br /&gt;
 ClientAliveCountMax 99999&lt;br /&gt;
&lt;br /&gt;
Restart sshd:&lt;br /&gt;
&lt;br /&gt;
 /etc/init.d/sshd restart&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Next, create a dedicated linux account with username &#039;remoteaccess&#039;.&lt;br /&gt;
This account will be used to handle the ssh connections.   In this&lt;br /&gt;
example, I will use an example password of remotepw.  For security&lt;br /&gt;
purposes, change the shell of &#039;remoteaccess&#039; to rbash which is a&lt;br /&gt;
restricted shell:&lt;br /&gt;
&lt;br /&gt;
 chsh -s /usr/bin/rbash remoteaccess&lt;br /&gt;
&lt;br /&gt;
Next, edit the .bashrc file for remoteaccess as follows:&lt;br /&gt;
&lt;br /&gt;
 trap exit SIGINT SIGTERM SIGQUIT SIGHUP&lt;br /&gt;
 stty susp \000&lt;br /&gt;
 echo &amp;quot;For remote access to VistA only...&amp;quot;&lt;br /&gt;
 while [ true ]&lt;br /&gt;
 do&lt;br /&gt;
        sleep 60000000&lt;br /&gt;
 done&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
You are now done setting things up on the linux side.  Now we proceed&lt;br /&gt;
with the Windows client which runs CPRS:&lt;br /&gt;
----&lt;br /&gt;
1) Obtain plink.exe from the web.  Its essentially a command line&lt;br /&gt;
version of putty.&lt;br /&gt;
&lt;br /&gt;
2) Create the following shortcut on your desktop.  This assumes you&lt;br /&gt;
have your RPC broker on linux listening on port 9000.  Change as&lt;br /&gt;
needed.  local-ip-of-linux-server is the internal ip address of the&lt;br /&gt;
linux server on the network in which it resides.&lt;br /&gt;
remote-ip-of-linuxserver is the ip address used to access it on the&lt;br /&gt;
public internet.&lt;br /&gt;
&lt;br /&gt;
 plink.exe -N -ssh -l remoteaccess -pw remotepw -L&lt;br /&gt;
 9000:local-ip-of-linux-server:9000 remote-ip-of-linuxserver&lt;br /&gt;
&lt;br /&gt;
 (local-ip-of-linux-server will normaly be 127.0.0.1)&lt;br /&gt;
&lt;br /&gt;
Configure the shortcut to run minimized.&lt;br /&gt;
&lt;br /&gt;
3) Create the following second shortcut on your desktop:&lt;br /&gt;
&lt;br /&gt;
 CPRSChart.exe S=localhost P=9000 CCOW=DISABLE&lt;br /&gt;
&lt;br /&gt;
To get this work, simply start the 1st shortcut and leave it running&lt;br /&gt;
minimized on your taskbar for the duration of the time in which you&lt;br /&gt;
will be using CPRS.  Then click on the second shortcut to start CPRS.&lt;br /&gt;
All communication between CPRS and the server should then occur over&lt;br /&gt;
the encrypted connection established by plink on port 22.&lt;br /&gt;
&lt;br /&gt;
If anyone has suggestions for improvement, feel free to comment.&lt;br /&gt;
Also, please review for security holes.&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
&lt;br /&gt;
Marc&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
--[[User:JohnLeoZ|gra&#039;pa Z]] 20:57, 1 Dec 2006 (CST)&lt;/div&gt;</summary>
		<author><name>Forum</name></author>
	</entry>
</feed>