dibaliklayar

Thursday, April 13, 2006

Strange things happened using SSH Secure Shell

I am using SSH client called SSH Secure Shell from www.ssh.com.

Server - linux
client - windows

When I upload file particularly file with '.txt' extension, SSH doing parsing and convert the new line character of windows ('\r\n') to new line character of Linux ('\n'). So when you upload txt file in this environment you will lost a few bites.
\r character is gone........ eaten by SSH Secure Client.

Maybe this is because I never see the manual or I am using a freeware....

I don't know whether to call this feature or what. but this makes me waste 3 hours of my time.... so hungry now :(((

This only happened with txt file. Since I do this on regular basis to upload comma seperated file into mysql database.

so when you do 'load data infile' command make sure try LINES TERMINATED BY '\r\n' and LINES TERMINATED BY '\n' in mysql.
if you have binary file viewer then you know what I mean.

in hex

\r\n = 0D0A

interesting.......:)

Thursday, April 06, 2006

Build HTPC 2

Almost there.
After buying all the ingedients I found that IBM mother board can not be installed in the new coolermaster casing. This is because the pins from the case do not match the pins in the IBM mobo. So I run to buy mobo.

Now, all parts is in the house.

- installing all parts together in the case didn't take much time. connect the PC using component cable.
- power on and got the BIOS
- the fan from power suply and the 60mm case fan are noizyyyyyyyy, I'll replace them later
- Installing WXP Media center.
- Finish installing and boot up normaly
- Installing all needed software like DVD player, nero and codecs. I got them all for free when I bought dual layer DVDRW and I love it. the codecs are free download from http://www.divx.com/. But I personally like Nimo and FFdShow in a package

- First boot with XP in samsung TRX3079 dissapoint me. I thought using HDTV and PC setup I will see a clear and crispy text, but NOT in a million years. samsung TRX3079 is tube(analog) and what ever you have digital you will still see analog version but maybe sharpened. Although the text looks blurry but its readable.
Do not buy this TV if you are looking for crispy text out of you HTPC.

Trying music;
- with the current set up I use the sound card that integrated in the mobo. Cheap but its okay. too bad that it does not have digital out. but its okay. Music plays okay using logitech 5300 speaker. In my small apartment I have to keep the sound low since my neighbour has a baby :(. I will too soon :)
Thinking this will be my last project. when the baby born I don't think I have time for this. I will be video grapher and photographer and the main actor/actrees is my baby :)

- Music give no problem, but the the sound is average, got to get a real sound card for better result

trying video;
- Have a lot of anime and drama in the disk. playing those drava is a breezee, just double click and you are watching it from my samsung trx3079 clear and nice color. But you trys to play a comppressed real media file the picture is very very disappointing.
Compressed file are not mend to be watched from tube TV, if you have LCD/plasma screen then this is okay I guess.
- Put a VCD in DVDrom and it plays automatically using media player.
- Drama movie looks okay, but not as good as using samsung 950 DVD player using HDMI connection.
- I put DVD matrix and it told me I can not paly the DVD , its not recognized. hhhmmmmmm I flipped out. hhhhhhhhhhh ssssssssssssssss breath ... breath hhhhhhhh ....ssssss hhhhhhhh.....ssssssss.
Now after a few research it turn out the DVD has encrytpion in it and can not be played in a PC. and also because that the tv out port of my VGA card is enabled by default. I can not disable it. hhhmm the only way to watch dvd from this HTPC is using those region free and CSS fre dvd player and it cost you about $40. hhhhhhhhhh I guess I will stick with my DVD palyer for now. I hate those corporation who implement this DVD protection. I bought the DVD legally and I can not watch it in my type of player? Screw them, They don't event say it in the box that this particular dvd can not be played in PC. Maybe I can sue them or blockbuster....hhhmmmmm

- anyway problem solved. Watch DVD from my DVD player for now. when I have more money then I will definitely buy those region_CSS free DVD player.
- I will use this PC for my recorded drama and tons of anime :)
Next project : Lobbying my wife to replace this damn TV with LCDTV

SSL certificate

I wrote before how to install self singed certificate into your server. the process to create real certificate is almost the same. but after you create the CSR you send the CSR to your CA and they will send you CRT file that you can install in your server. once its install just restart the apache and you are good to go.

Choosing CA:

after several days researching CA I have a conclusion;
- Verisign is veri expensive but veri trusted. go with them if secutiry is no. 1 in your list.
- geotrust , cheap if you have a package from your ISP like 1and1 that offer $49 per year.
- network solution cheap , but they screw my account and I am leaving them
- digicert, is ok CA and they offer a very cheap wildcard certificate that cover 1 domain regardles the server or subdomain you have. this is a bargain for enterprise user.
- thawte, has been around for sometimes and cover a lot more countries than verisign. I set up secure servers in Afghanistan before with them and had no problem. As for US based CA they rejected my request since afghanistan is one of the banned country for doing business like selling cryptography. Sound ridiculous, since 90% of goverment in Afghanistan is build by US, but this is US law.

there is a lot more CA in the WWW but those what I am considering to have a big account with.

Other alternative is that you have your own CA server that will process any SSL request. If I am a central bank, I am going to this route. but it will cost you millions of dollars to have such server. Last time I check it will cost me US$25M. But you will be able to use this server to serve your employee(each has ones own cert) for login into your domain/AD, serve your offsite client (branch/local banks).

We setup Reuters client for one bank before and Reuters use this kind of server. So one client using 1 dedicated certificate.

if you have question just shoot email to me.

SSL certificate Cont.

I wrote before how to install self singed certificate into your server. the process to create real certificate is almost the same. but after you create the CSR you send the CSR to your CA and they will send you CRT file that you can install in your server. once its install just restart the apache and you are good to go.

Choosing CA:

after several days researching CA I have a conclusion;
- Verisign is veri expensive but veri trusted. go with them if secutiry is no. 1 in your list.
- geotrust , cheap if you have a package from your ISP like 1and1 that offer $49 per year.
- network solution cheap , but they screw my account and I am leaving them
- digicert, is ok CA and they offer a very cheap wildcard certificate that cover 1 domain regardles the server or subdomain you have. this is a bargain for enterprise user.
- thawte, has been around for sometimes and cover a lot more countries than verisign. I set up secure servers in Afghanistan before with them and had no problem. As for US based CA they rejected my request since afghanistan is one of the banned country for doing business like selling cryptography. Sound ridiculous, since 90% of goverment in Afghanistan is build by US, but this is US law.

there is a lot more CA in the WWW but those what I am considering to have a big account with.

Other alternative is that you have your own CA server that will process any SSL request. If I am a central bank, I am going to this route. but it will cost you millions of dollars to have such server. Last time I check it will cost me US$25M. But you will be able to use this server to serve your employee(each has one's own cert) for login into your domain/AD using regular login or smart card, and/or serve your offsite client (branch/local banks).

We setup Reuters client for one bank before and Reuters use this kind of server. So one client using 1 dedicated certificate.

if you have question just shoot email to me.