Can't start the SSH service in CentOS V6.9
Clash Royale CLAN TAG#URR8PPP
up vote
-2
down vote
favorite
Currenlty ssh service is in stop status.when we trying to start this service following error shows;
'/etc/ssh/sshd_config line 23: directive 'protocol' is not allowed within a match block'.
How to fix this issue and start ths ssh service
Here is the first part of the config file:
linux centos ssh services
add a comment |Â
up vote
-2
down vote
favorite
Currenlty ssh service is in stop status.when we trying to start this service following error shows;
'/etc/ssh/sshd_config line 23: directive 'protocol' is not allowed within a match block'.
How to fix this issue and start ths ssh service
Here is the first part of the config file:
linux centos ssh services
Can you post your/etc/ssh/sshd_config
? It looks like you need to end your match block before using theProtocol
directive
â rusty shackleford
Jun 7 at 9:45
1
From the top of your screenshot to theProtocol 2
line, I count 19 lines, not 23. So is there anything that includes the wordMatch
in the first 4 lines that are not visible? (In an unedited/etc/ssh/sshd_config
file from RHEL 6.9, thatProtocol 2
line seems to be line 21, not 23. So it looks like this file has been edited at some point.)
â telcoM
Jun 7 at 9:56
@rusty shackleford : sorry can't get the entire data beacuse we can not login to the server.Only can access via vnc.
â Indika Kulasighe
Jun 7 at 10:37
@telcoM I have attached the first part of the ssh config file..
â Indika Kulasighe
Jun 7 at 10:40
I have comment first to lines.It works for me.
â Indika Kulasighe
Jun 7 at 10:54
add a comment |Â
up vote
-2
down vote
favorite
up vote
-2
down vote
favorite
Currenlty ssh service is in stop status.when we trying to start this service following error shows;
'/etc/ssh/sshd_config line 23: directive 'protocol' is not allowed within a match block'.
How to fix this issue and start ths ssh service
Here is the first part of the config file:
linux centos ssh services
Currenlty ssh service is in stop status.when we trying to start this service following error shows;
'/etc/ssh/sshd_config line 23: directive 'protocol' is not allowed within a match block'.
How to fix this issue and start ths ssh service
Here is the first part of the config file:
linux centos ssh services
edited Jun 7 at 10:39
asked Jun 7 at 9:42
Indika Kulasighe
11
11
Can you post your/etc/ssh/sshd_config
? It looks like you need to end your match block before using theProtocol
directive
â rusty shackleford
Jun 7 at 9:45
1
From the top of your screenshot to theProtocol 2
line, I count 19 lines, not 23. So is there anything that includes the wordMatch
in the first 4 lines that are not visible? (In an unedited/etc/ssh/sshd_config
file from RHEL 6.9, thatProtocol 2
line seems to be line 21, not 23. So it looks like this file has been edited at some point.)
â telcoM
Jun 7 at 9:56
@rusty shackleford : sorry can't get the entire data beacuse we can not login to the server.Only can access via vnc.
â Indika Kulasighe
Jun 7 at 10:37
@telcoM I have attached the first part of the ssh config file..
â Indika Kulasighe
Jun 7 at 10:40
I have comment first to lines.It works for me.
â Indika Kulasighe
Jun 7 at 10:54
add a comment |Â
Can you post your/etc/ssh/sshd_config
? It looks like you need to end your match block before using theProtocol
directive
â rusty shackleford
Jun 7 at 9:45
1
From the top of your screenshot to theProtocol 2
line, I count 19 lines, not 23. So is there anything that includes the wordMatch
in the first 4 lines that are not visible? (In an unedited/etc/ssh/sshd_config
file from RHEL 6.9, thatProtocol 2
line seems to be line 21, not 23. So it looks like this file has been edited at some point.)
â telcoM
Jun 7 at 9:56
@rusty shackleford : sorry can't get the entire data beacuse we can not login to the server.Only can access via vnc.
â Indika Kulasighe
Jun 7 at 10:37
@telcoM I have attached the first part of the ssh config file..
â Indika Kulasighe
Jun 7 at 10:40
I have comment first to lines.It works for me.
â Indika Kulasighe
Jun 7 at 10:54
Can you post your
/etc/ssh/sshd_config
? It looks like you need to end your match block before using the Protocol
directiveâ rusty shackleford
Jun 7 at 9:45
Can you post your
/etc/ssh/sshd_config
? It looks like you need to end your match block before using the Protocol
directiveâ rusty shackleford
Jun 7 at 9:45
1
1
From the top of your screenshot to the
Protocol 2
line, I count 19 lines, not 23. So is there anything that includes the word Match
in the first 4 lines that are not visible? (In an unedited /etc/ssh/sshd_config
file from RHEL 6.9, that Protocol 2
line seems to be line 21, not 23. So it looks like this file has been edited at some point.)â telcoM
Jun 7 at 9:56
From the top of your screenshot to the
Protocol 2
line, I count 19 lines, not 23. So is there anything that includes the word Match
in the first 4 lines that are not visible? (In an unedited /etc/ssh/sshd_config
file from RHEL 6.9, that Protocol 2
line seems to be line 21, not 23. So it looks like this file has been edited at some point.)â telcoM
Jun 7 at 9:56
@rusty shackleford : sorry can't get the entire data beacuse we can not login to the server.Only can access via vnc.
â Indika Kulasighe
Jun 7 at 10:37
@rusty shackleford : sorry can't get the entire data beacuse we can not login to the server.Only can access via vnc.
â Indika Kulasighe
Jun 7 at 10:37
@telcoM I have attached the first part of the ssh config file..
â Indika Kulasighe
Jun 7 at 10:40
@telcoM I have attached the first part of the ssh config file..
â Indika Kulasighe
Jun 7 at 10:40
I have comment first to lines.It works for me.
â Indika Kulasighe
Jun 7 at 10:54
I have comment first to lines.It works for me.
â Indika Kulasighe
Jun 7 at 10:54
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
0
down vote
Add this on line 3:
Match all
You have not ended the Match
block.
I added this line but couldn't start ssh. I have comment those first two lines and start.It works. Anyway thanks for ur help.
â Indika Kulasighe
Jun 7 at 10:53
add a comment |Â
up vote
0
down vote
The first two lines have apparently been added as part of a chroot jail set-up for user restricted_user_1
.
Since that user is apparently related to system backups, I think it's kind of important... so a better solution would be to move those two lines to the end of the sshd_config file instead. That should both avoid the problem with the Protocol 2 line and not break the setup of restricted_user_1
user.
If you use Match
blocks in sshd_config
, then the ordering of lines in the file is important.
- you should place any configuration lines that should be the default settings before any
Match
blocks. Some configuration options cannot be used within Match blocks: those options should always be placed before anyMatch
block. - when a
Match
block begins, it will only end either at the start of anotherMatch
block or at end-of-file. AMatch
block can be used to conditionally override some of the default settings. Anything after the firstMatch
block until end-of-file will belong to oneMatch
block or another.
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Add this on line 3:
Match all
You have not ended the Match
block.
I added this line but couldn't start ssh. I have comment those first two lines and start.It works. Anyway thanks for ur help.
â Indika Kulasighe
Jun 7 at 10:53
add a comment |Â
up vote
0
down vote
Add this on line 3:
Match all
You have not ended the Match
block.
I added this line but couldn't start ssh. I have comment those first two lines and start.It works. Anyway thanks for ur help.
â Indika Kulasighe
Jun 7 at 10:53
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Add this on line 3:
Match all
You have not ended the Match
block.
Add this on line 3:
Match all
You have not ended the Match
block.
answered Jun 7 at 10:45
rusty shackleford
1,135115
1,135115
I added this line but couldn't start ssh. I have comment those first two lines and start.It works. Anyway thanks for ur help.
â Indika Kulasighe
Jun 7 at 10:53
add a comment |Â
I added this line but couldn't start ssh. I have comment those first two lines and start.It works. Anyway thanks for ur help.
â Indika Kulasighe
Jun 7 at 10:53
I added this line but couldn't start ssh. I have comment those first two lines and start.It works. Anyway thanks for ur help.
â Indika Kulasighe
Jun 7 at 10:53
I added this line but couldn't start ssh. I have comment those first two lines and start.It works. Anyway thanks for ur help.
â Indika Kulasighe
Jun 7 at 10:53
add a comment |Â
up vote
0
down vote
The first two lines have apparently been added as part of a chroot jail set-up for user restricted_user_1
.
Since that user is apparently related to system backups, I think it's kind of important... so a better solution would be to move those two lines to the end of the sshd_config file instead. That should both avoid the problem with the Protocol 2 line and not break the setup of restricted_user_1
user.
If you use Match
blocks in sshd_config
, then the ordering of lines in the file is important.
- you should place any configuration lines that should be the default settings before any
Match
blocks. Some configuration options cannot be used within Match blocks: those options should always be placed before anyMatch
block. - when a
Match
block begins, it will only end either at the start of anotherMatch
block or at end-of-file. AMatch
block can be used to conditionally override some of the default settings. Anything after the firstMatch
block until end-of-file will belong to oneMatch
block or another.
add a comment |Â
up vote
0
down vote
The first two lines have apparently been added as part of a chroot jail set-up for user restricted_user_1
.
Since that user is apparently related to system backups, I think it's kind of important... so a better solution would be to move those two lines to the end of the sshd_config file instead. That should both avoid the problem with the Protocol 2 line and not break the setup of restricted_user_1
user.
If you use Match
blocks in sshd_config
, then the ordering of lines in the file is important.
- you should place any configuration lines that should be the default settings before any
Match
blocks. Some configuration options cannot be used within Match blocks: those options should always be placed before anyMatch
block. - when a
Match
block begins, it will only end either at the start of anotherMatch
block or at end-of-file. AMatch
block can be used to conditionally override some of the default settings. Anything after the firstMatch
block until end-of-file will belong to oneMatch
block or another.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
The first two lines have apparently been added as part of a chroot jail set-up for user restricted_user_1
.
Since that user is apparently related to system backups, I think it's kind of important... so a better solution would be to move those two lines to the end of the sshd_config file instead. That should both avoid the problem with the Protocol 2 line and not break the setup of restricted_user_1
user.
If you use Match
blocks in sshd_config
, then the ordering of lines in the file is important.
- you should place any configuration lines that should be the default settings before any
Match
blocks. Some configuration options cannot be used within Match blocks: those options should always be placed before anyMatch
block. - when a
Match
block begins, it will only end either at the start of anotherMatch
block or at end-of-file. AMatch
block can be used to conditionally override some of the default settings. Anything after the firstMatch
block until end-of-file will belong to oneMatch
block or another.
The first two lines have apparently been added as part of a chroot jail set-up for user restricted_user_1
.
Since that user is apparently related to system backups, I think it's kind of important... so a better solution would be to move those two lines to the end of the sshd_config file instead. That should both avoid the problem with the Protocol 2 line and not break the setup of restricted_user_1
user.
If you use Match
blocks in sshd_config
, then the ordering of lines in the file is important.
- you should place any configuration lines that should be the default settings before any
Match
blocks. Some configuration options cannot be used within Match blocks: those options should always be placed before anyMatch
block. - when a
Match
block begins, it will only end either at the start of anotherMatch
block or at end-of-file. AMatch
block can be used to conditionally override some of the default settings. Anything after the firstMatch
block until end-of-file will belong to oneMatch
block or another.
answered Jun 7 at 12:16
telcoM
10k11032
10k11032
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f448378%2fcant-start-the-ssh-service-in-centos-v6-9%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Can you post your
/etc/ssh/sshd_config
? It looks like you need to end your match block before using theProtocol
directiveâ rusty shackleford
Jun 7 at 9:45
1
From the top of your screenshot to the
Protocol 2
line, I count 19 lines, not 23. So is there anything that includes the wordMatch
in the first 4 lines that are not visible? (In an unedited/etc/ssh/sshd_config
file from RHEL 6.9, thatProtocol 2
line seems to be line 21, not 23. So it looks like this file has been edited at some point.)â telcoM
Jun 7 at 9:56
@rusty shackleford : sorry can't get the entire data beacuse we can not login to the server.Only can access via vnc.
â Indika Kulasighe
Jun 7 at 10:37
@telcoM I have attached the first part of the ssh config file..
â Indika Kulasighe
Jun 7 at 10:40
I have comment first to lines.It works for me.
â Indika Kulasighe
Jun 7 at 10:54