VMware Cloud Community
vmkarthik
Enthusiast
Enthusiast

Not able to run any cmd from ssh

Hi,

I tend to see this problem from time to time but dont know whats exactly causing it.

The problem is When I connect to the ESXi4.1thro ssh and try to run any command it gives the following message (as shown in the attachment).

It happens intermittently and after a reboot it would again start working fine.

Any help?

Reply
0 Kudos
5 Replies
RustyRus
Enthusiast
Enthusiast

My guess would be that the shell is "hidden" and it gets touchy at times. I doubt there is any real issue that you are having with the ESXi server.

Reply
0 Kudos
VTsukanov
Virtuoso
Virtuoso

You can check the contents of your environment variable $path( /sbin)

echo $PATH

Also you can start esxtop as

./esxtop

or

/sbin/esxtop

Reply
0 Kudos
vmkarthik
Enthusiast
Enthusiast

Hi,

Thanks . It works with the way you said.

but the point is normally I do not add the path or ./ when i run any command and it would work. so how it runs and suddenly doesnt?

Thanks

Reply
0 Kudos
athlon_crazy
Virtuoso
Virtuoso

The "$" sign show that you run the "esxtop" command as normal instead root user. Try become root first then run the command again

http://www.no-x.org
Reply
0 Kudos
VTsukanov
Virtuoso
Virtuoso

If the path "/sbin" is in the variable $path you do not need to specify the path, if it is not there then you have to specify the full/relative path

/sbin/esxtop 

or

./esxtop

.

You are working with an prompt $, it looks like that you have created a new user, but by default created users have the value $path only "/bin", just as root has "/bin:/sbin".

:smileyplus:

>so how it runs and suddenly doesnt?

It depends on the paths contained in the variable $path.

Reply
0 Kudos