Thursday, June 10, 2010

How to set/change ipaddress in linux terminal?

In order to set or change  the IP address assigned to a certain interface in your linux machine you can use GUI. Use System -> Administration ->Network. But it is not always possible to use GUI. Sometimes you need to use terminal commands (like if you are ssh'ing).
Login as root and use the following command:
#ifconfig eth0 11.11.1.178 netmask 255.255.248.0
where eth0 is the interface you want to configure
 11.11.1.178 is the ipaddress being assigned to that interface
 255.255.248.0 is the subnet mask

we can use system-config-network to configure DNS settings.

Friday, June 4, 2010

SSH login without having to specify password each time

The following procedure works for OpenSSH_5.2p1, OpenSSL 0.9.8k-fips 25 Mar 2009. To check version of your ssh use $ssh -V. In case you have version other than this, please refer $man ssh and check which file permissions should be applied to Files (e.g. permissions of ~/.ssh/authorized_keys should be 640 otherwise ssh will ignore the file).

$:ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/swapnil/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/swapnil/.ssh/id_rsa.
Your public key has been saved in /home/swapnil/.ssh/id_rsa.pub.
The key fingerprint is:
67:50:53:ef:84:67:69:38:87:8a:03:14:fd:8b:df:68 swapnil@localhost.localdomain
The key's randomart image is:
+--[ RSA 2048]----+
| oo o.. |
| . .. . = . |
| . .. = O |
| . o.. O |
| S.+. . |
| .+. |
| . o |
| E . |
| . |
+-----------------+

Comment: Enter passphrase (empty for no passphrase): here simply enter a return key

Step 2:
$:cat .ssh/id_rsa.pub | ssh localhost 'cat >> .ssh/authorized_keys'
swapnil@localhost's password: 

Step 3:
$:chmod 600 ~/.ssh/authorized_keys  

Step 4: 
$:ssh localhostLast login: Fri May 21 16:06:34 2010 from localhost

 

Android aar deployment in Maven - 2022

Introduction If you are working on android library project, you might be wondering how to publish it on Maven like this . Earl...