-1

I have the following issue. When I try to login as the pi user with the local IP adders I get this error:

ssh: connect to host 192.168.0.101 port 22: Connection refused
Couldn't read packet: Connection reset by peer

I am not listening on port 22 at all, as I have changed the ssh port to something else.

And if I try using the external IP, I get this error:

Permission denied, please try again.

I can ssh into it just fine with both internal and external IPs. I have bound the internal IP and setup port forwarding.

Any idea where the problem might be?

2
  • Possibly related: askubuntu.com/questions/264046/…
    – Brick
    Commented Aug 29, 2017 at 12:45
  • 'When I try to login as the pi user with the local IP adders[sic] I get this error:' and then 'I can ssh into it just fine with both the internal and external IPs' . This is confusing. It would be better to state the IP addresses in use and which ones have a problem. If you are trying to ssh to the unit and have moved sshd to a port other than 22 then you'll have to specify the port in your ssh connection/command.
    – Charemer
    Commented Aug 30, 2017 at 12:07

1 Answer 1

0

Figured it out. Just had to provide the server with my public key and use the IdentityFile option for sftp.

Thus, the command is :

sftp -oIdentityFile=/path/to/file -oPort=port user@address 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.