2

Hi some time back I asked this question and made a lot of changes to secure my system. Now I need to make a dummy account and give ssh access of this account to a friend. But I am unable to receive any incoming ssh connections. I can ssh to any server via my computer but can not ssh to even localhost. I am sure its due to some settings I changed in a bid to make my system more secure but know I don't remember those changes.

For one, I have disabled ufw. Also there is nothing blocking any user in /etc/ssh/sshd_config or in /etc/hosts.allow or /etc/hosts.deny.

I have attached the output of ssh -v localhost here. I narrowed down the problem to debug1: SSH2_MSG_SERVICE_ACCEPT received by comparing my output with this output on a friend's computer.

Edit 1: This is the output on using ssh -vvvvvv localhost

Any help is appreciated.

0

2 Answers 2

2

Try re-installing sshd with a purge:

sudo apt-get remove --purge ssh-server
sudo apt-get install ssh-server

The most probable root cause is a botched config in /etc/ssh/ssh_config. A purge would remove this file, and give you a blank slate, hopefully fixing your issue.

0
1

I just had the same issue - secured system and unable to connect with a new account. It even seems to disconnect my existing connections with a different account, after a log in attempt.

I just found out that I restricted all access to only a few configured users. The configuration is found in /etc/ssh/sshd_config:

[..]
# Authentication:
LoginGraceTime 120
PermitRootLogin no
StrictModes yes
AllowUsers username1 username2
PermitEmptyPasswords no
[..]

I only need to add the username to the "AllowUsers" rule and restart the sshd daemon.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .