ssh in CentOS

Hi Experts,
I have CENTOS installed, version 6.5
How to check, if SSH is active ?
I need to SSH with a user for my inventorry software.
Eprs_AdminSystem ArchitectAsked:
Who is Participating?
 
gheistConnect With a Mentor Commented:
By default CentOS has ssh on and allowed through firewall.
Since you say you CAN login, but then again Spiceworks can not - can you try storing right root password in spiceworks?
0
 
ste5anSenior DeveloperCommented:
E.g.

clear && ps aux | grep ssh

Open in new window

.
0
 
omarfaridCommented:
try it. login to server then run

ssh 0

This should bring you login prompt
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
ste5anSenior DeveloperCommented:
@omarfarid: this changes the state of the system..
0
 
omarfaridCommented:
How? I am not saying run

init 0

ssh 0 will run ssh to connect to local host ( 0 is local host ip address)
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Download PuTTY and try to connect via SSH from your Windows PC ?
0
 
ste5anSenior DeveloperCommented:
Yup, it will start a ssh process. This is a state change, thus you have circumvented the question 'check, if SSH is active', cause you started it so the answer is always true.
0
 
Dave GouldOnsite SupportCommented:
Who needs to initiate the connection? You or the other end?
If its you, you dont need the sshd deamon running so the ps command in the first reply wont change much.
start by checking you have the right packages :
yum list openssh
yum list openssh-clients
0
 
omarfaridCommented:
Dear ste5an,

I think the author wants to verify if sshd is running on the system or not so remote user can connect to the server.

Another way to get status os sshd on the centos server is to run

service sshd status

OR

/etc/init.d/sshd status
0
 
ste5anSenior DeveloperCommented:
Maybe.. but this is also covered by the ps-grep.

p.s.
But this is a security affected question. Thus we can expect precise questions. Just my 0.02..
0
 
omarfaridCommented:
To be more accurate with the ps-grep command:

ps -ef | grep -v grep | grep sshd
0
 
ste5anSenior DeveloperCommented:
Not really, as we are just guessing whether the OP means ssh or sshd..
0
 
Eprs_AdminSystem ArchitectAuthor Commented:
the correct package is installed, I checked already.
0
 
Eprs_AdminSystem ArchitectAuthor Commented:
with this screenshot you can see, I can login.
ssh-login-to-centos.JPG
0
 
Eprs_AdminSystem ArchitectAuthor Commented:
then it scans and tries to login with another user...see pic
ssh-login-ok-but-scan-error.JPG
0
 
ste5anSenior DeveloperCommented:
@Eprs_Admin, you may have already derived from the thread, that your question is not as precise as it could be.

What do you mean by 'How to check, if SSH is active'? Do you want to use SSH to connect from a different machine to your CentOS machine (means running sshd) or do you want to connect from your CentOS machine to a different machine (means running ssh)?

What packet(s) are you referring to?

Don't post screen shots of some fancy GUI. Use the shell (terminal) to gather the necessary information.
0
 
Eprs_AdminSystem ArchitectAuthor Commented:
From the shell I can connect to the linux .
But from Spiceworks not.

Now I know when SSH ist running :-)
0
 
gheistCommented:
Firewall?
0
 
Dave GouldOnsite SupportCommented:
I'm still not sure if the second screenshot is to the centos or from it but in either case, it would seem that the cennection is being made correctly but you are having authentication problems.
Does the account ssh-administrator-d13 exist on the remote machine?
Where did you get this account from? Is it in the spiceworks config?
0
 
ste5anSenior DeveloperCommented:
Well, maybe your question is better placed in the Spiceworks community..
0
 
omarfaridCommented:
The screen shot itself is confirming that ssh is running on the server. It seems that this is a port scanning tool to find open ports (running), may be as security audit.

Are you using username / password to authenticate with this tool? Or are you using keys to authenticate?
0
 
serialbandConnect With a Mentor Commented:
In centos & other Redhat based distros you should be able to run.

chkconfig --list ssh

to list whether ssh should be active or not upon startup in the various run levels.

I think I've already pointed you to the spiceworks community in your other question.  The problem seems to be with spiceworks when you try to add the server, not with ssh itself.  Have you tried manually adding your server yet?
0
 
MazdajaiConnect With a Mentor Commented:
Is your firewall running?

service iptables status
service iptables stop
netstat -atn|grep 22

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.