ssh command not found

Issues related to hardware problems
Post Reply
alajangi
Posts: 35
Joined: 2012/01/04 08:39:16

ssh command not found

Post by alajangi » 2012/02/19 15:43:18

Hi Experts,

In my centOS6 machine ssh cmd is giving the following Error

# ssh
-bash: ssh: command not found

checked the sshd service as below

# service sshd status
openssh-daemon (pid 5406) is running...

But cmd not available in below paths and the file ssh_config is not available under /etc/ssh

# which ssh
/usr/bin/which: no ssh in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)

# ls -lrt /etc/ssh
total 152
-rw-------. 1 root root 125811 Nov 12 2010 moduli
-rw-r--r--. 1 root root 627 Dec 11 18:18 ssh_host_key.pub
-rw-------. 1 root root 963 Dec 11 18:18 ssh_host_key
-rw-------. 1 root root 1675 Dec 11 18:18 ssh_host_rsa_key
-rw-r--r--. 1 root root 382 Dec 11 18:18 ssh_host_rsa_key.pub
-rw-r--r--. 1 root root 590 Dec 11 18:18 ssh_host_dsa_key.pub
-rw-------. 1 root root 668 Dec 11 18:18 ssh_host_dsa_key
-rw-------. 1 root root 3848 Feb 19 19:08 sshd_config

Any advise ?

Thanks,
KK.

User avatar
AlanBartlett
Forum Moderator
Posts: 9345
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

ssh command not found

Post by AlanBartlett » 2012/02/19 22:04:13

Do you have the relevant package, [b]openssh-clients[/b], installed?

[code]
[ajb@Build32R6 ~]$ which ssh
/usr/bin/ssh
[ajb@Build32R6 ~]$ rpm -qf $(!!)
rpm -qf $(which ssh)
openssh-clients-5.3p1-70.el6_2.2.i686
[ajb@Build32R6 ~]$ rpm -qi $(!!)
rpm -qi $(rpm -qf $(which ssh))
Name : openssh-clients Relocations: (not relocatable)
Version : 5.3p1 Vendor: Red Hat, Inc.
Release : 70.el6_2.2 Build Date: Wed 18 Jan 2012 03:31:17 AM EST
Install Date: Wed 25 Jan 2012 06:31:52 PM EST Build Host: hs20-bc2-4.build.redhat.com
Group : Applications/Internet Source RPM: openssh-5.3p1-70.el6_2.2.src.rpm
Size : 1052153 License: BSD
Signature : RSA/8, Wed 25 Jan 2012 02:26:56 AM EST, Key ID 199e2f91fd431d51
Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL : http://www.openssh.com/portable.html
Summary : An open source SSH client applications
Description :
OpenSSH is a free version of SSH (Secure SHell), a program for logging
into and executing commands on a remote machine. This package includes
the clients necessary to make encrypted connections to SSH servers.
[ajb@Build32R6 ~]$
[/code]

Post Reply