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.
Thursday, June 10, 2010
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
$: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
Subscribe to:
Posts (Atom)
Securing Microservices with JWT Authentication and Data Encryption
Securing Microservices with JWT Authentication and Data Encryption Securing Microservices with JWT A...
-
Have you tried to mock a method in Kotlin? As mentioned in this guide we can simply use following code to make it work. //You can mock conc...
-
Introduction If you are working on android library project, you might be wondering how to publish it on Maven like this . Earl...
-
For scanning wifi access points at interval of 30 seconds, I have the following code. However I strongly discourage frequent scanning as i...