You are not logged in.
I'm pretty new to this. I changed the port number in /etc/ssh/sshd_config and uncommented the line. I've also restarted the service with 'systemctl restart sshd.service' as root. I then used 'nmap -P0 localhost' to check if it worked, it did not. I also tried this which I found online 'iptables -I INPUT 1 -p tcp --dport <port #> -j ACCEPT' and retried nmap on it. Still nothing. It no longer shows up on port 22 like it did before but does not show up under the new port #.
Thanks.
Last edited by klever (2015-11-19 02:45:07)
Offline
Are you using the socket service? If so, consider https://wiki.archlinux.org/index.php/Se … shd_daemon; you will also need to edit the socket service file (as explained on the wiki).
By the sounds of it, you aren't. What do the logs for sshd report?
Offline
I then used 'nmap -P0 localhost' to check if it worked, it did not.
That command doesn't scan all ports (just common low ports i think), try this instead...
nmap -p- localhostYou can also try connecting to the correct port with the ssh command, does it work?
Last edited by Slithery (2015-11-17 08:08:28)
Offline
Please, for the love of baby kittens stop using nmap to see if a service is listening on a certain port. This is what the `ss` command is for. To see what port SSH is listening on (if any), use `ss -tnlp | grep sshd` and look at the 4th column.
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
klever wrote:I then used 'nmap -P0 localhost' to check if it worked, it did not.
That command doesn't scan all ports (just common low ports i think), try this instead...
nmap -p- localhostYou can also try connecting to the correct port with the ssh command, does it work?
This. This was my issue. Using this instead I can see the port is listening. Now just got to get the host to try connecting on a non 22 port. Thanks.
Offline
Please, for the love of baby kittens stop using nmap to see if a service is listening on a certain port. This is what the `ss` command is for. To see what port SSH is listening on (if any), use `ss -tnlp | grep sshd` and look at the 4th column.
For some reason it's showing my port is listening but it doesn't show up as ssh or sshd so I had to use `ss -tnlp`.
Offline
For some reason it's showing my port is listening but it doesn't show up as ssh or sshd so I had to use `ss -tnlp`.
OK... What is listening on that port?
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
klever wrote:For some reason it's showing my port is listening but it doesn't show up as ssh or sshd so I had to use `ss -tnlp`.
OK... What is listening on that port?
`ss -tnlp` returns (the relavent row):
`LISTEN 0 128 *:<port #> *:*`
I was able to successfully connect through ssh on that port from my laptop.
Offline
`ss -tnlp` returns (the relavent row):
`LISTEN 0 128 *:<port #> *:*`
Oh sorry, I should have specified to run `ss` as root (or using sudo).
I was able to successfully connect through ssh on that port from my laptop.
Glad it's working. Don't forget to mark your thread as solved by editing your first post ![]()
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Ah, problem solved. Thanks.
If you were wondering whence went your post, you hit 'report', not 'reply' ![]()
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
klever wrote:Ah, problem solved. Thanks.
If you were wondering whence went your post, you hit 'report', not 'reply'
Oh crap haha. Can I take that back?
Offline
Nope ![]()
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
Nope
Haha. Sorry fukawi2 ![]()
Offline