SSH Port Forwarding (Tunneling) in Squeak (was: SSH)
david.mitchell at gmail.com
Mon Jan 28 22:17:42 UTC 2008
Picking up an old thread...
Would like to use this to do a port forward. Today, I have a little
Squeak app that talks to a MySQL database on the other side of a
forwarded SSH port. I'm on windows, so I use plink (command line
C:\bin\plink.exe -ssh -P 22 -l username -pw password -L
3306:mySqlServerIpAddress:3306 -N sslServerIpAddress
(with placeholders for username, password, and the 2 IP addresses)
This works, but I'd like to get an all Squeak solution (easier for me
to deploy). Hopefully easier to keep up (plink goes away
I started with:
SSH runBy: 'username' to: 'sslServerIPAddress' port: 22
The first issue was the server wanted a password and I hadn't
specified one. I couldn't find the appropriate place to hook in a
password, so I hardcoded my password into this method:
| requestMsg |
requestMsg := SSHUserAuthRequestMessage new
userName: self connection userName;
subMsg: (SSHUserAuthPasswordRequestSubMessage new
"------>" password: 'password'; "was password: self
self machine sendMsg: requestMsg.
That worked (I get the banner from the server), but I know I need to
find where the connection is set up to provide the password.
Even with that hack in place,I get errors every time I type any
character into the Teletype Morph. I suspect this is because the
server isn't expecting a shell (-N).
So my questions are:
1. Can you use this to forward a port? If so, do you have an example?
2. Where to set password if the server is expecting one (non-interactive).
On Oct 13, 2007 1:48 PM, Robert Withers <reefedjib at yahoo.com> wrote:
> Thanks for the reminder, Lex. I published the following packages to
> Universes, with dependencies, in the System category:
> Cryptography Team Package
> SSL (depends on Cryptography Team Package)
> SSH (depends on Telnet, Cryptography Team Package, SSL)
> I tested this in my image successfully. However, my image has two
> fixes applied in order to successfully load Telnet. I posted these
> fixes in an earlier email in this thread: 1 is new and the other is
> listed somewhere in Mantis. These need to be applied to the update
> stream to allow forward progress.
> BTW, Lex, S/MIME is released in the Crypto Monticello repository and
> I am done with it. It works with the basic email client.
> On Oct 12, 2007, at 11:26 AM, Lex Spoon wrote:
> > Robert Withers <reefedjib at yahoo.com> writes:
> >> This worked for me. I loaded them from the Monticello repository. I
> >> haven't yet tried to define the package for Crypto/SSL/SSH and I
> >> probably wont get to it before next week. I am going on vacation.
> > If there is anything that can be done to make the package-posting
> > process easier, it would be nice to know. As far as I can tell,
> > though, you open an editor, create an account, and post your package,
> > all using a GUI that is included right in the image. Ideas for
> > improving it are always welcome, though!
> > Oh, and to second everyone else: ssh in Squeak -- very cool!
> > -Lex
More information about the Squeak-dev