Posted by: isaraffee | August 25, 2009

Exploring ssh in Mandrivia Spring 2009

Exploring ssh in Mandrivia Spring 2009

To check if ssh client program is installed, type:

[root@localhost Desktop]# which ssh

/usr/bin/ssh

 

To check if ssh server is installed, type:

[root@localhost Desktop]# which sshd

which: no sshd in (/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/lib/qt4/bin)

This shows that the ssh server is not installed. TO install the package go to Program (this is the Start icon at the bottm-left of the screen). Go to Install and Remove Softwate. Search for ssh and select OpenSSH server package. You may have to pop in your Mandrivia Spring 2009 DVD installation disk.

 

After the installation, type:

 

[root@localhost Desktop]# rpm -qa | grep openssh

openssh-5.2p1-1mdv2009.1

openssh-server-5.2p1-1mdv2009.1

openssh-clients-5.2p1-1mdv2009.1

[root@localhost Desktop]# which sshd

/usr/sbin/sshd

 

This shows that the openssh server and clients programs are installed.

 

Start up the ssh server service:

 

[root@localhost Desktop]# /usr/sbin/sshd

 

Check that the sshd server servie is ruuning:

 

[root@localhost Desktop]# ps -ef|grep sshd

root     28827     1  0 12:29 ?        00:00:00 /usr/sbin/sshd

 

ssh locally to your own locally machine:

[root@localhost Desktop]# ssh 192.168.1.100

Warning: Permanently added ‘192.168.1.100’ (RSA) to the list of known hosts.

root@192.168.1.100’s password:                                             

Permission denied, please try again.

 

You are not permitted to ssh into the root account.

 

You have to set the PermitRootLogin in your /etc/ssh/sshd_config file to yes as shown below:

 

PermitRootLogin yes

 

Save and exit the file. You will have to restart the sshd process.

 

To restart the sshd process go to /etc/init.d directory:

 

[root@localhost init.d]# ./sshd

Usage: ./sshd {start|stop|restart|reload|condrestart|status}

 

Checking the sshd status:

 

[root@localhost init.d]# ./sshd status

sshd (pid  28827) is running…

 

Restart the sshd process:

[root@localhost init.d]# ./sshd restart

Stopping sshd:                                                  [  OK  ]

Starting sshd:                                                  [  OK

 

Now try to ssh into your local machine:

 

[root@localhost ~]# ssh 192.168.1.100

root@192.168.1.100’s password:

Last login: Sun Aug 16 12:18:29 2009

 

You should be able to ssh into the root account.

 

To log into another account type:

[root@localhost ~]# ssh ismail@192.168.1.100

ismail@192.168.1.100’s password:

Last login: Sun Aug 16 11:52:19 2009

 

If you have another workstaion which is conneted in a LAN, you can also try out ssh to remote login to that workstation using ssh. But remember to log in to the remote workstation, sshd must be running in that remote workstation.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: