fogbound.net




Sun, 22 Oct 2006

Reverse SSH tunnels in Mac OS X

— SjG @ 9:02 am

I’m one of the many people who will be using VNC to do remote assistance for a relative using Windows.

There are a number of tutorials out there. Most of them fail because they require the ability to VNC in to the remote system, which won’t work in my case because the remote Windows box is behind a firewall/router that I can’t configure. There are also several reverse approaches out there, where the user needing assistance initiates the connection. The first of these I say was Gina Trapani’s approach at Geek to Live, which uses UltraVNC on both ends. This is almost the solution I want, except that it requires Windows on my end as well. It also assumes that I’m at a fixed location.

In the comments, I came across Fazal Majid’s response. He had the same requirements as I do, and links to his source where he built a customized VNC server that targets a fixed IP address. Fazal’s approach matches my needs exactly.
But then I ran into the problem of the last step: the reverse SSH tunnel from my known server (which gets hard-coded into the executable) to my notebook running Chicken of the VNC.
Building reverse SSH tunnels is really not that difficult. But when I created the setup, I was able to make it work from a Linux machine and from a Cygwin terminal under Windows, but it mysteriously failed under Mac OS. Using lots of -v flags, I kept seeing the service for the port on the Mac side refusing the connection from the tunnel. The ssh debug looked like:

debug1: remote forward success for: listen 5900, connect localhost:5500
debug1: client_input_channel_open: ctype forwarded-tcpip rchan 2 win 131072 max 32768
debug1: client_request_forwarded_tcpip: listen localhost port 5900, originator ::1 port 60475
debug1: channel 0: new [::1]
debug1: confirm forwarded-tcpip
debug3: channel 0: waiting for connection
debug1: channel 0: not connected: Connection refused
debug2: channel 0: zombie
debug2: channel 0: garbage collecting
It turns out that this means the tunnel doesn’t even see the service. After wasting time with firewall tests and a lot of other false leads, I finally noticed the [::1] notation in there. Yup, that’s an IPv6 address. The solution is to make sure the ssh tunnel is using IPv4. For reference, the command that works is:

ssh -nNT4 -R 5500:localhost:5500 -l my_username myhost.com


Thu, 31 Aug 2006

Another Reason to Hate Microsoft

— SjG @ 3:00 pm

So a Windows Update breaks the ability to allocate big chunks fo contiguous memory (http://support.microsoft.com/kb/924054/), which causes this JBoss configuration to fail. Restarting summons the dreaded VM Error: Could not reserve enough space for object heap error message.

So Microsoft knows they broke stuff. They have a “hotfix” (which, despite the “hot” part of the name will require a reboot). But I can’t just download it. Nope. Gotta pay for a support contract.

Now, I don’t have a huge issue with a bug like this creeping into a Windows security update. Let’s face it, bugs happen. But to charge me to fix the problem, even after I paid for the OS? That’s just not right. Cast my vote for Free Software.


Mon, 28 Aug 2006

Overheard

— SjG @ 8:38 am

This was being shouted into a telephone so loudly that I heard it through the office door as I passed along in the hallway:

“No, not now! I’m not going to negotiatiate, I’m late for meditation!”

Filed in:

Sat, 19 Aug 2006

State of Fear

— SjG @ 8:07 pm

Michael Crichton, HarperCollins, 2004.

Crichton knows how to write a thriller, and even when it’s a pedantic screed, he still manags to make it fun. Imagine, if you will, a cabal of evil environmentalists, who go to outlandish lengths to try to kill lots of people in order to sway public opinion, thereby bringing in more revenues for their nefarious organizations (which need big money primarily to support their leaders’ lavish lifestyles). Don’t think too hard about the fact that these evil environmentalists’ biggest scheme is to trigger a tsunami in order to spread fear about climate change (huh!?).

Crichton definitely has his axe to grind, and even has a few valid points to make (I liked the idea about double-blind science funding, for example). But this just isn’t a book you can take seriously as anything but a preachy adventure. There are some fun aspects, though. I enjoyed the barely disguised Martin Sheen and Barry Glasner characters, for example, and Crichton’s sadistic glee in dispatching one of them. Crichton is obviously infuriated by hypocracy within the environmental movement and among its promoters. And sure, he has plenty of footnotes to support his “no such thing as global warming” hypothesis — drawing different conclusions than some of the studies’ authors. He explains that away by arguing that they have to make the politically-correct assumption in order to publish. But any chance of taking his science seriously is impacted by assertions like that there are more old-growth forests around today than 150 years ago (must have something to do with what the definition of “are” is).


Wed, 9 Aug 2006

Scary Experience

— SjG @ 6:38 pm

So, I was getting ready to purchase an altogether too scrumptious sandwich at the local Supermarket, when I was faced with waiting in the self-checkout line or the one where actual humans got paid to do a job and work the machine for you. Since the lines were long at the self-checkouts, and because I’m another post-industrial, contact-starved person, I went for the standard check-out line.

The woman in front of me was paying by check. I don’t remember her total, but it was something and seventeen cents. The checker stated the price, and half a dozen little screens lit up with the number. The woman wrote her check, and handed it to the checker.

“I’ll have to give you change,” the checker said, opening the register and fishing out some coins. “You wrote the check for (whatever) seventy, when your total was (whatever) seventeen.”

This is when the woman in front of me exploded. Boom. Puff of angry smoke. Seething rage from a place straight out of a Lovecraft yarn.

“You said seventy!” she said, her voice quivering with anger.

Perhaps at this time it would be appropriate to give some more details. The checker was a dark-haired, medium complected woman in her mid forties. She had a slight accent. If you were to ask me, I’d guess that she was a native Spanish speaker, although the name on her nametag would suggest Eastern Europe. If you had to pin me down, I would guess that she was of South American descent. The woman in front of me was perhaps ten years older, lighter complected, with graying hair. She flashed a lot of her teeth when she spoke. She was probably once very attractive. She spoke as close to accent-less English as I’m capable of discerning.

The checker handed the woman two quarters and three pennies. “I want to speak to a manager!” demanded the woman, accepting the change. The checker picked up her station phone, and said something quietly.

Over dashed the manager. “How can I help?” he asked.

“If you intend to do business here,” declaimed the woman, “it would be to your advantage to have employees who can speak English.”

“What is the problem?” the manager asked. “What’s wrong?”

“My total,” said the woman. “She clearly said seventy when she meant seventeen. It’s not the money. It’s the principle. If your employees cannot speak the language, they cannot communicate with your customers.”

“Were you overcharged?” asked the manager.

“I have made my point,” the woman said, and with an exaggerated flourish dumped the two quarters and two of the pennies into the Leukemia Foundation Donation bin. The other penny missed the slot, skidded off the checkstand, bounced to the floor, and rolled off into oblivion. The woman turned, and walked forcefully out of the store.

The manager was short, and dark complected, with thick, curly black hair. His accent was clearly that of a Spanish speaker, and his nametag bore a typically Mexican last name.

I looked at the checker and the manager, and shrugged my shoulders. He shook his head, and walked away.

“How are you?” the checker asked me, smiling, as she slid my sandwich over the scanner. “That will be three ninety-five.”

I understood her perfectly.