Passwordless login remote with SSH

generate the public keys

[email protected]> ssh-keygen –t rsa

Generating public/private rsa key pair.
Enter file in which to save the key (/home/user1/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/user1/.ssh/id_rsa.
Your public key has been saved in /home/user1/.ssh/
The key fingerprint is:

[email protected]> cd /home/user1/.ssh
[email protected]> cp authorized_keys

Copy the file authorized_keys to server2 and it is now possible to login without password.

[email protected]> cd /home/user1/.ssh
[email protected]> scp authorized_keys server2:/home/user1/.ssh

How To Make RPM Packages

When working with RedHat Linux systems the best way to ensure that you have the right software installed is by using RPM’s

RPM is a package management system like Solaris packages.

To create packages from source code some or all of the following steps would be needed.

To set it up a build environment and number of configuration files are needed.

First the build environment.

cd /home/asbjorn
mkdir myrpm
cd rpm

In earlier releases of RedHat a file .rpmrc was used.

Now rpmbuild uses the .rpmmacros for default values.

In the first two lines, information about the package creator is provided.

The _topdir line is included, so the package can be build as a user rather than as root.
Do not build packages as root if you can avoid it.

The following lines provide references to the build environment.

cd /home/asbjorn

vi .rpmmacros

%packager      Asbjorn Riedel <[email protected]>
%vendor        The name of the project

%_topdir       /home/asbjorn/myrpm


By defining the .spec file we can set up all the parameters needed for building packages of software delivered as tar files.

The %{_prefix} definition can be changed depending on the location where you want your package to be installed, example /opt, /usr or /usr/local. Just change the line with Prefix:  in it.

 vi myrpm/SPECS/testpackage.spec

%define name testpackage
%define version 0.0.1
%define release 1

Summary: A test package for RedHat Linux
Name: %{name}
Version: %{version}
Release: %{release}
Vendor: Guess It Must Be Me
License: None
Group: System
Prefix: %{_prefix}

This is a testpackage , specially made for testing

%package devel
Summary: package with stuff to develop %{name}.
Group: System
Requires: %{name} = %{version}

%description devel
The %{name}-devel testpackage contains stuff for building %{name}.

%setup -q




%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%doc ReadMe

%files devel
%doc ReadMe

* Thu Mar 27 2008 Asbjorn Riedel <
[email protected]>
– Initial spec file

The %install part contains the actual commands to build the software and it may need to be changed in your case.


How to finally do the build …

rpmbuild -ba SPECS/testpackage.specs