Showing posts with label ssh. Show all posts
Showing posts with label ssh. Show all posts

21 December, 2010

MobaXterm: free X server for Windows

I work under Linux and Windows on a daily base, so from quite some time I was looking for simple, free and reliable X server for Windows. Just to mention that I have tried several solutions before: X server under Cygwin, Xming, and some commercial software as well.

Cygwin: I have tried that solution long time ago, perhaps now it is way better. At that time, it was quite slow, heavy and not that simple for occasional purposes.

Xming: That is in principle what I need. It works... almost... I have problems running it under limited user account, I heard about problems under Vista, as well...

As result, I kept using alternative ways to avoid using X. Usually, as awkward as: NoMachine (or VNC over SSH) to Linux machine at work, then to the target Linux machine... This solution is still acceptable for occasional use, since I have already everything setup to connect at work. Of course, this "solution" is very inconvenient for occasional use to a regular Linux machine.

Anyway, today (yes, it is only one day and I am already excited) I have found another free software that completely fits my need!!! MobaXterm. It has embedded all the tools one needs and some extra in a single PORTABLE file of 13 MB! No installation (well there is such possibility if you insist) - just run and enjoy. You get more than what you can expect. 
  • X server - you can turn it on/off interactively
  • Simple file transfer - very neat
  • Remote XDMCP session - certainly handy
  • Local applications: mc, wget, vim, ssh - just to mentions some...
  • rsync - this one is just a jewel (providing that ssh environment is available)
  • Many more, not that important... I keep exploring...
Exactly what I want. I can't imagine what could be better... Do you?

22 November, 2009

Windows to Linux file synchronization over ssh: Unison solution

The aim: Portable and simple solution (no administrative right required on both sides) to synchronize files from Windows to Linux machine over insecure network (trough ssh) using Unison (ie. using only freeware software).
The problems: There is no ssh command line client in Windows.

Here are the important details:
I have used Unison (version 2.32.52), runtime GTK+ 2.14.7a environment from the Pidgin project (as described on the unison's page), plink.exe (version 0.60) and small script to point unison's sshcmd to plink.exe.

1) Create a new folder and unpack the two executable from Unison ("Unison" in my case).

2) As user install GTK somewhere.
- add the c:\somewhere\GTK\2.0\bin to the PATH variable in the system settings.
- or copy all files from \GTK\2.0\bin to the Unison folder. Then copy the whole (not the content) "etc", "lib" and "share" folders as well in the same folder.
3) Download and copy plink.exe in the "Unison" folder.

4) In notepad copy paste the following line
@c:\pathtoputty\plink.exe -ssh -P 22 -pw [mypassword] -l [myusername] -load [myputtysavedsession] "unison -server -auto"
change to fit your configuration and save it as "plinker.bat" in the "Unison" folder.
If you use pagent from the PuTTY then you can omit the username and password and use ssh-keys as usual (then also your password will be safe)

5) On the linux computer download or install unison. It will be good if you match the version on the Windows machine or vice versa. If you download the static binary, put it somewhere in your $PATH.

6) Start the Unison Gui version and configure your profile. This will fail, because ssh is not specified. Go to C:\Documents and Settings\yourprofile\.unison and add this line to the profile you have created.
sshcmd = plinker.bat
This and the GTK assumes that you have started Unison from its folder.

6) Start again - this time it should work. Enjoy.

Note: In point 4 you might need to provide the full path to the unison binary on the Linux machine.
Note: Since the configuration for the server address is actually specified in "plinker.bat" (it actually overrides the address specified in unison) you will need another script to connect to another server.

The original idea for the plinker.bat script is taken from here.