Posts

Showing posts from September, 2009

Disabling IPv6 lookup for the time being

Just had a chance to open up my hosts file under F11,and saw an entry that got my attention it was the second row as shown below. [root@sawrub-xbox ~]# cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 [root@sawrub-xbox ~]# Moving around the web get me to the conclusion that its related to the IPv6 . The IPv6 site also shouted out at me ,with my IPv4 IP Address. Thinking over it, questions came up to the every answer that i was getting, let me collect all question together first and make the answers follow them: Q1] If my machine is still IPv4, why was the entry of IPv6 over there under /etc/hosts . Q2] Why is this enabled by default. Q3] How do i control IPv6 fetch from my applications. Q4] How do I disable IPv6 at my machine. Q5] How do i get IPv6 address. The answers are here. A1] Kernel 2.2+ come with IPv6 built in. A2] Ipv4 is now ~30 Y...

Reading a txt file in a Zip

A problem came up...to read a text file without extracting the file from the zip file. So it was like this how i went by it: 1] Zip file was present in my home dir by the name 'archive.zip',so listing the file in home directory was done by. [sawrubt@sawrub ~]# [sawrub@sawrub ~]# ll archive.zip -- output deprecated -- [sawrub@sawrub ~]# 2] List the files present in that archive. [sawrub@sawrub ~]# unzip -l archive.zip|tail -- output deprecated -- 9999770 09-02-09 12:09 00010b32.jdb 9999963 09-02-09 12:09 00010b33.jdb 6371421 09-11-09 11:36 00010b34.jdb 71 09-11-09 11:49 version.txt -------- ------- 628281884 504 files [sawrub@sawrub ~]# 3] And now my task was I had to read version.txt, so went by firing in the command [sawrub@sawrub ~]# unzip -p archive.zip version.txt -- output deprecated -- [sawrub@sawrub ~]# and all was done. Definition of '-p' option per unix manual: -p extract files to pipe ...

Preventing Inactive SSH Snapping

Sometimes we face issues like very frequent connection breaks in the ideal SSH sessions,and its mostly because of "a packet filter or NAT device timing out your TCP connection due to inactivity." http://www.openssh.com/faq.html#2.12 So here is the work around for the same. Linux : 1] Open following file /etc/ssh/ssh_config (as Root user). 2] Append the following line in there at the bottom. 3] ServerAliveInterval 60 4] Save the file. 5] Restart the sshd daemon. 6] The line entered have the following definition. ServerAliveInterval Sets a timeout interval in seconds after which if no data has been received from the server, ssh will send a message through the encrypted channel to request a response from the server. The default is 0, indicating that these messages will not be sent to the server. This option applies to protocol version 2 only. Source :man page of ssh_config [man 5 ssh_config] Windows [Putty] : 1] Open Putty. ...

SSH : Secure Shell

Using SSH [Secured SHell] is a very good mechanism to work on a remote system with full secured communication between client and server as the communicate is under SSL and no one sitting over the wire can read the encrypted data being transferred. SSH came up as a replacement to the old unsecured protocols like ftp,telnet. What all makes difference : - Security OpenSSH supports 3DES, Blowfish, AES and arcfour as encryption algorithms. These are patent free.Encryption is started before authentication, and no passwords or other information is transmitted in the clear. Encryption is also used to protect against spoofed packets. - Compression Requests compression of all data (including stdin, stdout, stderr, and data for forwarded X11 and TCP connections).The compression algorithm is the same used by gzipCompression is desirable on modem lines and other slow connections, but will only slow down things on fast networks. - Key based authentication [RSA / DSA] Strong authentication protects...