Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSHD "Address already in use" #2400

Closed
ghost opened this issue May 2, 2018 · 9 comments
Closed

SSHD "Address already in use" #2400

ghost opened this issue May 2, 2018 · 9 comments

Comments

@ghost
Copy link

ghost commented May 2, 2018

here's basically my issue, Termux SSHD says that port 8022 is already in use, how would I fix this?

this is what I get when i run "sshd -d"

bug1: sshd version OpenSSH_7.7, OpenSSL
1.0.2n 7 Dec 2017 debug1: private host
key #0: (Not showing this)
debug1: private host key #1: (Not showing this)
debug1: private host key #2: (Not showing this)
debug1:
rexec_argv[0]='/data/data/com.termux/files/usr/bin/sshd'
debug1: rexec_argv[1]='-d' debug1: Bind
to port 8022 on ::. Bind to port 8022 on
:: failed: Address already in use.
debug1: Bind to port 8022 on 0.0.0.0.
Bind to port 8022 on 0.0.0.0 failed:
Address already in use.
Cannot bind any address.

And i am rooted so i cant change whatever i need to change

@Grimler91
Copy link
Member

sshd is probably already running?

@ghost
Copy link

ghost commented May 3, 2018

@Zach-15803 Check open ports with command netstat -tulpn.

@ghost
Copy link
Author

ghost commented May 3, 2018

turns out it was already running,

but even when adding the public key to the authorized list, it denies me access when I run

ssh {my ip} -p 8022
Permission denied (publickey,keyboard-interactive).

@ghost
Copy link

ghost commented May 4, 2018

Make sure that:

  1. You don't messed up sshd settings on Termux
  2. sshd is running as non-root user
  3. File authorized_keys is created without typos in name
  4. Each public key in placed on a new line. If you are using editor 'nano' to edit file contents, make sure
    that your nanorc has option set nowrap.
  5. You have added a right key to authorized_keys.

If you still can't connect, I suggest you to try a dropbear instead of openssh.

@ghost
Copy link
Author

ghost commented May 4, 2018

I still couldnt connect, but now dropbear is saying its version of the exact same error as the firts post, Port 8022 is already in use, even after a Reinstall of termux

@fornwall fornwall closed this as completed Jun 8, 2018
@Merith-TK
Copy link

hey fornwall, Apologies, i have two accounts, this was never solved, AT ALL,

reason for two accounts is one is for school and the other is for personal

@Grimler91
Copy link
Member

@DovaMerith We can't really tell what your doing wrong as you haven't even showed us what you have been doing. @xeffyr posted some excellent steps that would solve most problems.

Post your exact steps that, everything you've tried and their output if you want help.

@ghost
Copy link
Author

ghost commented Jun 13, 2018 via email

@iT-Boyer
Copy link

iT-Boyer commented Dec 8, 2020

i have this same issue

@ghost ghost locked and limited conversation to collaborators Oct 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants