Thursday, November 19, 2009

Method for "The INSECURE X11" connection

If you have already setup an ssh connection to your remote machine, then getting the X11 client application (on the remote) to show up on your (local) diplay is easy.

CAVEAT: THIS IS THE INSECURE METHOD THE SSH PEOPLE ARE ALWAYS WARNING ABOUT.

Before you login to the remote machine make sure your X11 server (Note: the server runs the display, not the programs, clients, or applications.), make sure it is listening for TCP connections. MANY X11 display managers have this turn OFF by default, John has shown how to do this in his article for gdm (gnome)

I use icewm, so I just use startx(1). As such, the following is at the end of my .login file.

echo Starting X in 3 seconds
sleep 3
startx -listen_tcp

Next, login to the remote machine and at the commandline enter:

$ export DISPLAY=192.168.123.100:0.0

then test your connection with

$ xterm


Then rather than hardcode the display add the following to your .chsrc or .bashrc file:

if [ -n "$SSH_CLIENT" ]
then
X=`echo $SSH_CLIENT | cut -f 1 -d " "`
# The insecure way
#export DISPLAY=$X:0.0
# The secure way
if [ "$X" = "192.168.123.100" ]
then
export DISPLAY=127.0.0.1:1
fi
#echo X $X
fi


NOTE #1: Substitute your domainname or your IP for 192.168.123.100.

NOTE #2: Your SSH shell/terminal will not close, if you have an X application running the secure way.

NOTE #3: This method is extremely useful, if you have control of your firewall.

Wednesday, November 18, 2009

Tech World Anagrams

Tech World Anagrams

Some are better then others.

Medical Marijuana = AN IDLE JAMAICA RUM

Thomas Edison = ATOMS DO SHINE
Albert Einstein = TEN ELITE BRAINS

Microsoft = IS COMFORT
Microsoft Windows = I'D WOW CONFORMISTS
Microsoft Windows Xp = WORM DOWNS PC, SO FIX IT
Microsoft Word = IFORMWORST.DOC
Microsoft Office = IS OF COMIC EFFORT
Microsoft Vista = FASCIST OR VOMIT
Microsoft Windows Vista = OVATIONS WORM SWIFT DISC
Microsoft Windows seven = NOW SNOW-COVERED MISFITS

Sun Microsystems = COSTS MESS - MY RUIN
Sunsoft = NOT FUSS

Freebsd Unix = BURNED FIXES
Netbsd unix = BID NEXT SUN
Openbsd Unix = INDEX UP SNOB
Berkeley System Distribution = TRUSTILY. BEE'S KNEES MORBIDITY
Berkeley Software Distribution = SWEATIEST OR BROKENLY BRUTIFIED
Gnu's Not Unix = UNSUNG TOXIN & SIX GUN ON NUT
Sourceforge = OGRE OF CURSE & FORCE ROGUES
Debian Linux = I ANNEX BUILD
Redhat Linux OS = Dear! Lush Toxin = IN HOARD EXULTS
Fedore Core OS = FREE CODE OR SO
Fedore Core Linux = IF DELUXE CROONER
Linus Torvalds = STUN AVID ROLLS

Public Domain = BULIMIAC POND

Free Open Source = UP OF SERENE CORE & OPENER OF SECURE

Free Open Source Software = SUFFOCATE OR SERENE POWER & NOW USE CAREFREE POOFTERS

Free Software Foundation = NOW OF SNUFFIER TOADEATER & WORN-OUT IF TONE-DEAF FEARS
-- TOADEATER [Originally, a charlatan's helper who ate (or pretended to eat) poisonous toads so that his employer could display his prowess in expelling the poison.]


Internet Guru = TURGENT URINE


World Wide Web = BORED, IDLE? - "W.W.W."
Web Surfing = IF SNUB GREW & WIN SERF BUG
Network Solutions = NOW STINK OUT LOSER
Internic = IN CRETIN
Internet protocol = COOL! NOT INTERPRET
Internet Protocol Version Six = INTROVERT CORNIEST EXPLOSION & SO INEXPERT SILVER CONTORTION
Domain Registry Service = REVENGES TRIM IDIOCRASY & I'M ANGRIEST RE-DISCOVERY

Boarder Gateway Protocol = COWPAT OR DEROGATORY ABLE

Secure Shell = HER CLUELESS

Universal Serial Bus = ILLUSIVE AS RARE SNUB

The C Programming Language = CLEAN RAMPAGING TOUGH GERM & GLEAM HOT GRUMPING CARNAGE

T One Line = NON-ELITE
Co Location = COOL ACTION!
Server Room = ERRORS MOVE
Beowulf Cluster = WE'LL BRUTE FOCUS

Relational Database = INALTERABLE AS A TOAD

High Definition Television = OH NO! THIEVING INFIDELITIES
Music Television = SIT, VOLUME IS NICE
Blue Ray Disk = IS BULKY DEAR

Silicon Valley = SOCIAL 'N' LIVELY & Villainy Close

American Telephone And Telegraph = REPELLANT MEATHEAD OR CHEAPENING & THE PAEDOPHILE, CLEAN ARRANGEMENT

Pacific Bell = IF CLIP CABLE

Computational Chemistry = PSYCHOTIC, MEAN MUTILATOR

high speed internet = EIGHTH SERPENTINED
This is really interesting in many mythologies. Gnostic, Hundu, Egyptian, Japaneses


Now to really blow your mind!
If your wondering how some of these anagrams ring true then think about these anagrams

Who Is Answering This? = A WRITHING SHOWINESS & WIN SINISTER HOGWASH

Messages In Anagrams = A MASSAGER MANGINESS
massage is to manipulate
manginess is defined as Mean; contemptible


Anagram Studies = Sugared Stamina & ARGUED SATANISM & Grade us, I'm Satan!

Friday, November 13, 2009

X Windows over ssh

Before we can get started you must enable your local X Server to recieve from the network.


To do this in Linux in edit /etc/X11/gdm/gdm.conf
Change:

#DisallowTCP=true
DisallowTCP=false


You will need to reboot your Linux box or restart the X-server which is more then I care to try to explain here. 

ssh -R 6001:127.0.0.1:6000 sokol@remote.host.name

sokol@192.168.1.116's password: xxxxx
Last login: Fri Apr 1 12:04:48 2005 from 192.168.1.108


[sokol@localhost ~]$ xterm -display 127.0.0.1:1


-- THEN an Xterm will pop-up on your local machine.


If you install cygwin on your windows PC this will also work using the X server in cygwin, or my favorate is using Hummingbird Exceed ( I have an ancient copy I use) on windows but over the ssh on Cygwin


Works great. I can run synaptic remotely and almost all X-apps that don't do high end graphics like games or video.

How to get a password-less Putty Session

==How to get a password less Putty Session==
Putty is the virtual ssh terminal under with windows.

Download putty-sshgen

Run putty-sshgen & generate keys

Go to the putty configuration for the session you want to be passwordless.

Add an entry for the ssh private key
     Session->Auth->

Login to your linux/bsd server

Add to ~/.ssh/authorized_keys the public key in the following fashion
  1. add a blank line
  2. add "ssh-rsa" with a blank space
  3. add the putty-sshgen public key, without the dashes, and all on one line.
When done ~/.ssh/authorized_keys should look like this:
       ssh-rsa 3NzaC1yc2EAAAAA--- RANDOM CRAP HERE ---aC1yc2EAA=