ssh_selinux_change_context: setcon failed with Invalid argument
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
0
down vote
favorite
I am trying to do ssh communication to an IP but I get the following error messages in logs.
Jun 5 11:36:50 thetemplate my-sshd[26346]: Accepted password for user1 from 172.80.1.2 port 34278 ssh2
Jun 5 11:36:50 thetemplate my-sshd[26346]: User child is on pid 27078
Jun 5 11:36:50 thetemplate my-sshd[27078]: ssh_selinux_change_context: setcon failed with Invalid argument
Jun 5 11:36:50 thetemplate my-sshd[27078]: Changed root directory to "/test//ssh/home/user1"
Jun 5 11:36:50 thetemplate my-sshd[26346]: error: ssh_selinux_setup_pty: security_compute_relabel: Invalid argument
According to this answer, I tried changing the context for my-sshd
by doing
chcon system_u:object_r:sshd_exec_t:s0 /test/bin/my-sshd
service sshd restart
The error messages still comes in /var/log/messages
while doing ssh.
On doing ps -eZ | grep sshd
I see that my-sshd
has a different context to /usr/sbin/sshd
unconfined_u:system_r:sshd_t:s0-s0:c0.c1023 24012 ? 00:00:00 sshd
unconfined_u:system_r:sshd_t:s0-s0:c0.c1023 24272 ? 00:00:00 sshd
unconfined_u:system_r:sshd_t:s0-s0:c0.c1023 29923 ? 00:00:00 sshd
unconfined_u:unconfined_r:unconfined_java_t:s0-s0:c0.c1023 32487 ? 00:00:00 my-sshd
Could this be the reason for these error messages, if yes how to proceed with this? Any guidance is much appreciated.
centos selinux
add a comment |Â
up vote
0
down vote
favorite
I am trying to do ssh communication to an IP but I get the following error messages in logs.
Jun 5 11:36:50 thetemplate my-sshd[26346]: Accepted password for user1 from 172.80.1.2 port 34278 ssh2
Jun 5 11:36:50 thetemplate my-sshd[26346]: User child is on pid 27078
Jun 5 11:36:50 thetemplate my-sshd[27078]: ssh_selinux_change_context: setcon failed with Invalid argument
Jun 5 11:36:50 thetemplate my-sshd[27078]: Changed root directory to "/test//ssh/home/user1"
Jun 5 11:36:50 thetemplate my-sshd[26346]: error: ssh_selinux_setup_pty: security_compute_relabel: Invalid argument
According to this answer, I tried changing the context for my-sshd
by doing
chcon system_u:object_r:sshd_exec_t:s0 /test/bin/my-sshd
service sshd restart
The error messages still comes in /var/log/messages
while doing ssh.
On doing ps -eZ | grep sshd
I see that my-sshd
has a different context to /usr/sbin/sshd
unconfined_u:system_r:sshd_t:s0-s0:c0.c1023 24012 ? 00:00:00 sshd
unconfined_u:system_r:sshd_t:s0-s0:c0.c1023 24272 ? 00:00:00 sshd
unconfined_u:system_r:sshd_t:s0-s0:c0.c1023 29923 ? 00:00:00 sshd
unconfined_u:unconfined_r:unconfined_java_t:s0-s0:c0.c1023 32487 ? 00:00:00 my-sshd
Could this be the reason for these error messages, if yes how to proceed with this? Any guidance is much appreciated.
centos selinux
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am trying to do ssh communication to an IP but I get the following error messages in logs.
Jun 5 11:36:50 thetemplate my-sshd[26346]: Accepted password for user1 from 172.80.1.2 port 34278 ssh2
Jun 5 11:36:50 thetemplate my-sshd[26346]: User child is on pid 27078
Jun 5 11:36:50 thetemplate my-sshd[27078]: ssh_selinux_change_context: setcon failed with Invalid argument
Jun 5 11:36:50 thetemplate my-sshd[27078]: Changed root directory to "/test//ssh/home/user1"
Jun 5 11:36:50 thetemplate my-sshd[26346]: error: ssh_selinux_setup_pty: security_compute_relabel: Invalid argument
According to this answer, I tried changing the context for my-sshd
by doing
chcon system_u:object_r:sshd_exec_t:s0 /test/bin/my-sshd
service sshd restart
The error messages still comes in /var/log/messages
while doing ssh.
On doing ps -eZ | grep sshd
I see that my-sshd
has a different context to /usr/sbin/sshd
unconfined_u:system_r:sshd_t:s0-s0:c0.c1023 24012 ? 00:00:00 sshd
unconfined_u:system_r:sshd_t:s0-s0:c0.c1023 24272 ? 00:00:00 sshd
unconfined_u:system_r:sshd_t:s0-s0:c0.c1023 29923 ? 00:00:00 sshd
unconfined_u:unconfined_r:unconfined_java_t:s0-s0:c0.c1023 32487 ? 00:00:00 my-sshd
Could this be the reason for these error messages, if yes how to proceed with this? Any guidance is much appreciated.
centos selinux
I am trying to do ssh communication to an IP but I get the following error messages in logs.
Jun 5 11:36:50 thetemplate my-sshd[26346]: Accepted password for user1 from 172.80.1.2 port 34278 ssh2
Jun 5 11:36:50 thetemplate my-sshd[26346]: User child is on pid 27078
Jun 5 11:36:50 thetemplate my-sshd[27078]: ssh_selinux_change_context: setcon failed with Invalid argument
Jun 5 11:36:50 thetemplate my-sshd[27078]: Changed root directory to "/test//ssh/home/user1"
Jun 5 11:36:50 thetemplate my-sshd[26346]: error: ssh_selinux_setup_pty: security_compute_relabel: Invalid argument
According to this answer, I tried changing the context for my-sshd
by doing
chcon system_u:object_r:sshd_exec_t:s0 /test/bin/my-sshd
service sshd restart
The error messages still comes in /var/log/messages
while doing ssh.
On doing ps -eZ | grep sshd
I see that my-sshd
has a different context to /usr/sbin/sshd
unconfined_u:system_r:sshd_t:s0-s0:c0.c1023 24012 ? 00:00:00 sshd
unconfined_u:system_r:sshd_t:s0-s0:c0.c1023 24272 ? 00:00:00 sshd
unconfined_u:system_r:sshd_t:s0-s0:c0.c1023 29923 ? 00:00:00 sshd
unconfined_u:unconfined_r:unconfined_java_t:s0-s0:c0.c1023 32487 ? 00:00:00 my-sshd
Could this be the reason for these error messages, if yes how to proceed with this? Any guidance is much appreciated.
centos selinux
asked Aug 3 at 10:54
rayindrane2l
61
61
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
Use command
audit2allow -w -a
and at the bottom of output You have got linux command what to use for resolve Your problem.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Use command
audit2allow -w -a
and at the bottom of output You have got linux command what to use for resolve Your problem.
add a comment |Â
up vote
0
down vote
Use command
audit2allow -w -a
and at the bottom of output You have got linux command what to use for resolve Your problem.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Use command
audit2allow -w -a
and at the bottom of output You have got linux command what to use for resolve Your problem.
Use command
audit2allow -w -a
and at the bottom of output You have got linux command what to use for resolve Your problem.
answered Aug 3 at 14:14
debek
208
208
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%2f460296%2fssh-selinux-change-context-setcon-failed-with-invalid-argument%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