SSH to new port, unable to login
Code:
## Change to other port is recommended I have to change it later no. If the someuser login works, i will change it to no. I created that someuser with the following command adduser someuser && passwd someuser But when i try to connect using that port with root or someuser, i am getting error. I am not able to connect. Why that so? |
Quote:
|
What is the error that you are getting when you try to connect?
Is anything else already using port 1212? Do you have a firewall set up to disallow connections? If you set the port to 22, does that work? If you run this, what does it return?: Code:
netstat -anp | grep 'LISTEN ' | grep -E '22|1212' |
Quote:
I can see only selinux. Error means, I am not allowed to login, It asks password again and again. I am trying it in a new putty client. When i replace the new config with old one, I am allowed to login. |
It's running on port 22.
You need to restart SSHD for your changes to port to take effect. |
Actually replaced the original config file now.
I will create a new config and post the result to you now. Yes, I restart sshd everytime i make changes. |
tcp 0 0 0.0.0.0:2499 0.0.0.0:* LISTEN 9526/sshd
tcp 0 0 :::2499 :::* LISTEN 9526/sshd I tried different port now. But i am still not able to login :( |
Check logs for messages about your logins:
Quote:
Quote:
|
I don't think i have firewall now.
I have install it once securing ssh. I can see login attempts from few ips in the log :) Quote:
Quote:
|
I meant the logs relevant to your login attempts - "Server listening on :: port 22" is irrelevant.
# tail -100 /var/log/secure | grep someuser |
This is what i found
Quote:
|
I just got it working.
Instead of deleting the default config file, I just modified the port and PermitRootLogin no It is working now. I have some questions. Please guide me |
What is this thread doing in 'Security' I've no idea. Needs to be moved to 'Newbie'
|
Quote:
I just used now default config file. Default config file has different values and some values are not available at all. Is it good just disabling root login and changing the port? What those config means? |
Quote:
|
All times are GMT -5. The time now is 02:49 PM. |