Arter reboot sshd service is stop??

Issues related to configuring your network
mayank_pasi
Posts: 16
Joined: 2016/12/25 16:04:05

Arter reboot sshd service is stop??

Postby mayank_pasi » 2017/01/11 09:32:04

hi

My server is stop service of sshd after reboot
Avery time fast start sshd start

after save iptables
then again it's stopd
what I do for save or start ssh service
Regards
Mayank

mghe
Posts: 617
Joined: 2015/11/24 12:04:43
Location: Katowice, Poland

Re: Arter reboot sshd service is stop??

Postby mghe » 2017/01/11 09:40:14

You have to enabled services to start during restart server.

# systemctl enable sshd.service

For iptables you have to allow for 22 port.

mayank_pasi
Posts: 16
Joined: 2016/12/25 16:04:05

Re: Arter reboot sshd service is stop??

Postby mayank_pasi » 2017/01/11 10:10:34

in my Laptop says that

ssh 10.63.35.156
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
ca:a8:48:77:8d:b3:40:10:c2:d3:e6:fa:5a:a5:35:5c.
Please contact your system administrator.
Add correct host key in /home/mayank/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/mayank/.ssh/known_hosts:1
RSA host key for 10.63.35.156 has changed and you have requested strict checking.
Host key verification failed.
[mayank@localhost ~]$


what is that

User avatar
TrevorH
Forum Moderator
Posts: 20293
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Arter reboot sshd service is stop??

Postby TrevorH » 2017/01/11 11:18:01

Did you read the messages? They tell you what is wrong. You have previously connected to this ip address and stored its ssh key fingerprint. Now you are connecting again and ssh is warning you that the fingerprint has changed. Either you have reinstalled the system, it's not the system you thought it was or someone has compromised your target machine and changed its ssh key.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

mayank_pasi
Posts: 16
Joined: 2016/12/25 16:04:05

Re: Arter reboot sshd service is stop??

Postby mayank_pasi » 2017/01/11 12:17:44

command is not working

[root@localhost /]# systemctl enable sshd.service
bash: systemctl: command not found

User avatar
TrevorH
Forum Moderator
Posts: 20293
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Arter reboot sshd service is stop??

Postby TrevorH » 2017/01/11 12:34:21

There is no systemctl command on CentOS 6.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

mayank_pasi
Posts: 16
Joined: 2016/12/25 16:04:05

Re: Arter reboot sshd service is stop??

Postby mayank_pasi » 2017/01/11 12:43:03

this is Wright by mghe

see post by mghe upper post

User avatar
TrevorH
Forum Moderator
Posts: 20293
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Arter reboot sshd service is stop??

Postby TrevorH » 2017/01/11 13:01:26

The command still won't exist on CentOS 6.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

mghe
Posts: 617
Joined: 2015/11/24 12:04:43
Location: Katowice, Poland

Re: Arter reboot sshd service is stop??

Postby mghe » 2017/01/11 14:25:24

mayank_pasi wrote:command is not working

[root@localhost /]# systemctl enable sshd.service
bash: systemctl: command not found



Sorry, it should be :

For check services runlevel
# chkconfig --list

For set sshd servces run during start system
# chkconfig --level 3 sshd on

Whoever
Posts: 935
Joined: 2013/09/06 03:12:10

Re: Arter reboot sshd service is stop??

Postby Whoever » 2017/01/12 02:41:45

mghe wrote:For set sshd servces run during start system
# chkconfig --level 3 sshd on


This may or may not work. You should allow for other runlevels:

Code: Select all

# chkconfig sshd on


In the case of sshd, this will turn it on for runlevels 2, 3, 4 and 5


Return to “CentOS 6 - Networking Support”

Who is online

Users browsing this forum: No registered users and 3 guests