11-23-2023 05:26 AM - edited 11-23-2023 05:26 AM
Hi all!
As the title suggests,
I have configured my Router to be running both http and ssh.
When trying to access the SSH port (22) i get connection refused.
Thank you for the help!
- Attached: config.txt
Solved! Go to Solution.
11-23-2023 06:18 AM
ip ssh port 2001 rotary 1
line 1 16
no exec
rotary 1
transport input ssh
exec-timeout 0 0
modem InOut
stopbits 1
Change the defualt port ssh use via above and make sure change any NAT use well known ssh port.
11-23-2023 05:36 AM - edited 11-23-2023 05:38 AM
Hello @piwale7827
The current configuration allows SSH access from the 192.168.100.0/24 and 11.1.9.0/24 subnets. You confirm that your client's IP address is in one of these subnets ?
Please do #show log and check if you have SSH error connection.
11-23-2023 06:04 AM
To my knowledge, the client access the router from one of these subnets.
Also, even if he didn't, Does that mean that he will get connection refused error as the port isnt open? i always thought that the restriction occurs on application level
11-23-2023 06:18 AM
ip ssh port 2001 rotary 1
line 1 16
no exec
rotary 1
transport input ssh
exec-timeout 0 0
modem InOut
stopbits 1
Change the defualt port ssh use via above and make sure change any NAT use well known ssh port.
11-23-2023 06:20 AM
Hello again MHM!
As always helpful but confusing xD
Can you please detail me what these lines do ?
Love you man thank you for all the responsiveness!
11-23-2023 06:38 AM
some times router not use 22 for ssh it use other port' these line force ssh to use specific port (not 22).
Note:- config only one line with these commnd.
11-23-2023 06:52 AM
Replicated the exact thing, and still im getting connection refused
11-23-2023 07:01 AM
Can I see the config you use
11-23-2023 07:13 AM
THank you very much it worked!
Was my own fault of something stupid.
you are the best as always see you later!
11-23-2023 06:17 AM
Well i dont know if it got anything to do with that but here is the last few lines from the time i tried to connect to port 22 on my cisco router.
*Nov 23 14:10:46.484: %SELINUX-3-MISMATCH: R0/0: audispd: type=AVC msg=audit(1700748646.483:4489): avc: denied { execute } for pid=14930 comm="sp.raw" name="ssh" dev="dm-0" ino=9210 scontext=system_u:system_r:polaris_nginx_t:s0 tcontext=system_u:object_r:ssh_exec_t:s0 tclass=file permissive=1
*Nov 23 14:10:46.484: %SELINUX-3-MISMATCH: R0/0: audispd: type=AVC msg=audit(1700748646.483:4489): avc: denied { read open } for pid=14930 comm="sp.raw" path="/tmp/sw/mount/isr4400-mono-universalk9.17.04.01a.SPA.pkg/usr/bin/ssh" dev="dm-0" ino=9210 scontext=system_u:system_r:polaris_nginx_t:s0 tcontext=system_u:object_r:ssh_exec_t:s0 tclass=file permissive=1
*Nov 23 14:10:46.484: %SELINUX-3-MISMATCH: R0/0: audispd: type=AVC msg=audit(1700748646.483:4489): avc: denied { execute_no_trans } for pid=14930 comm="sp.raw" path="/tmp/sw/mount/isr4400-mono-universalk9.17.04.01a.SPA.pkg/usr/bin/ssh" dev="dm-0" ino=9210 scontext=system_u:system_r:polaris_nginx_t:s0 tcontext=system_u:object_r:ssh_exec_t:s0 tclass=file permissive=1
*Nov 23 14:10:46.484: %SELINUX-3-MISMATCH: R0/0: audispd: type=AVC msg=audit(1700748646.483:4489): avc: denied { map } for pid=14930 comm="ssh" path="/tmp/sw/mount/isr4400-mono-universalk9.17.04.01a.SPA.pkg/usr/bin/ssh" dev="dm-0" ino=9210 scontext=system_u:system_r:polaris_nginx_t:s0 tcontext=system_u:object_r:ssh_exec_t:s0 tclass=file permissive=1
*Nov 23 14:10:46.490: %SELINUX-3-MISMATCH: R0/0: audispd: type=AVC msg=audit(1700748646.488:4490): avc: denied { search } for pid=14930 comm="ssh" name=".ssh" dev="overlay" ino=1233879 scontext=system_u:system_r:polaris_nginx_t:s0 tcontext=system_u:object_r:ssh_home_t:s0 tclass=dir permissive=1
*Nov 23 14:10:46.491: %SELINUX-3-MISMATCH: R0/0: audispd: type=AVC msg=audit(1700748646.489:4491): avc: denied { name_connect } for pid=14930 comm="ssh" dest=22 scontext=system_u:system_r:polaris_nginx_t:s0 tcontext=system_u:object_r:ssh_port_t:s0 tclass=tcp_socket permissive=1
*Nov 23 14:10:46.492: %SELINUX-3-MISMATCH: R0/0: audispd: type=AVC msg=audit(1700748646.491:4492): avc: denied { getattr } for pid=14930 comm="ssh" path="/root/.ssh" dev="overlay" ino=1233879 scontext=system_u:system_r:polaris_nginx_t:s0 tcontext=system_u:object_r:ssh_home_t:s0 tclass=dir permissive=1
*Nov 23 14:10:46.495: %SELINUX-3-MISMATCH: R0/0: audispd: type=AVC msg=audit(1700748646.494:4493): avc: denied { read } for pid=14930 comm="ssh" name="known_hosts" dev="overlay" ino=1233882 scontext=system_u:system_r:polaris_nginx_t:s0 tcontext=system_u:object_r:ssh_home_t:s0 tclass=file permissive=1
*Nov 23 14:10:46.495: %SELINUX-3-MISMATCH: R0/0: audispd: type=AVC msg=audit(1700748646.494:4493): avc: denied { open } for pid=14930 comm="ssh" path="/root/.ssh/known_hosts" dev="overlay" ino=1233882 scontext=system_u:system_r:polaris_nginx_t:s0 tcontext=system_u:object_r:ssh_home_t:s0 tclass=file permissive=1
*Nov 23 14:10:46.495: %SELINUX-3-MISMATCH: R0/0: audispd: type=AVC msg=audit(1700748646.494:4494): avc: denied { getattr } for pid=14930 comm="ssh" path="/root/.ssh/known_hosts" dev="overlay" ino=1233882 scontext=system_u:system_r:polaris_nginx_t:s0 tcontext=system_u:object_r:ssh_home_t:s0 tclass=file permissive=1
thank you!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide