Showing posts with label suse. Show all posts
Showing posts with label suse. Show all posts

Monday, September 17, 2012

Upgrade linux SUSE to SP2

Steps to upgrade Linux SUSE 11 from SP1 to SP2.

The original steps are listed at novell site:
http://www.novell.com/support/kb/doc.php?id=7010200

Here are the steps I executed in order to upgrade Linux SUSE11 from SP1 to SP2:

1. Installed the following packages:

SUSE_SLES-SP2-migration
sle-sdk-SP2-migration:



2. Started "wagon" (linux update tool)
3. Followed wagon's instructions.
 - registered the system
 - enabled both SP1 and SP2 repositories (this is critical, otherwise there were some dependcies shown which could not be resolved)
 - accepted all defaults and exected the migration process
4. Rebooted the machine
5. Ran wagon again
6. After going through the steps it showed that the system upgrade was successful


Sunday, September 16, 2012

Setup passwordless ssh in linux in 4 easy steps

Say, you need to setup a way to login to another machine without the need to enter a password. You will need to do a few steps to configure this so called "passwordless ssh access"

For simplicity we assume you are on $server1 and want to be able to ssh to $server2. Your username is $sshuser.

1. Generate a pair of keys: 

sshuser@server1:~> ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/sshuser/.ssh/id_rsa):
Created directory '/home/sshuser/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/sshuser/.ssh/id_rsa.
Your public key has been saved in /home/sshuser/.ssh/id_rsa.pub.
The key fingerprint is:
22:80:5e:b6:31:d9:a4:fa:2e:7b:de:fb:f0:a9:81:05 sshuser@server1
The key's randomart image is:
+--[ RSA 2048]----+
|     ..          |
|    . +.         |
|   . o +Eo.      |
|    ....o+o      |
|        So.      |
|        .o       |
|       . .o      |
|      o .. + .   |
|      .B+ +++    |
+-----------------+



2. Create "~/.ssh" directory on server2 for sshuser. It may exist already, but it will not hurt anyway:

sshuser@server1:~> ssh $server2 'mkdir -p $/.ssh; chmod 700 $/.ssh'
Password:

3. Upload public key of the user to server2:

sshuser@server1:~> cat ~/.ssh/id_rsa.pub | ssh $server2 'cat >> .ssh/authorized_keys2; chmod 640 .ssh/authorized_keys2' 


4. That's it! Now you should be able to login to server2 without password:
sshuser@server1:~> ssh $server2

Finally, see all the commands in a single shoot:

ssh-keygen -t rsa
ssh $server2 'mkdir -p ~/.ssh; chmod 700 $/.ssh'
cat ~/.ssh/id_rsa.pub | ssh $server2 'cat >> .ssh/authorized_keys2' 
ssh $server2 'chmod 640 .ssh/authorized_keys2' 
ssh $server2