0

I'm using an instance of Ubuntu 22.04.1 LTS via AWS, having enabled ports 22 and 443 in Ubuntu via ufw, and I'm using a Security Group with those same ports enabled.

Although I'm able to connect via SSH using a .cer key file, when I attempt to connect via SFTP with the same credentials I get the message:

Credentials were not accepted by the server

I'm using Transmit for Mac, and having built environments using Ubuntu before with the same type of configuration (.cer key file and so on), this problem is new to me.

Some recommend installing vsftpd, but I'd prefer not installing and configuring anything until I know for certain I need to, and this isn't something fixable with what I have.

I found an answer here in Ask Ubuntu and I was wondering if this is a possible fix?

I ran: systemctl status sshd and found the following:

error: maximum authentication attempts exceeded for ubuntu from [IP redacted] port 50773 ssh2 [preauth]

12
  • Please try with the -v option to see what happens.
    – FedKad
    Mar 2, 2023 at 12:44
  • Transmit doesn't provide CLI options. Mar 2, 2023 at 12:49
  • I never used a Mac, but doesn't your Mac provide commands like ssh and sftp? Or you can try filezilla-project.org/download.php?platform=osx
    – FedKad
    Mar 2, 2023 at 12:53
  • I ran: sftp -v ~/.ssh/[key-file].cer ubuntu@[IP address] and got: OpenSSH_7.8p1, LibreSSL 2.6.2 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 48: Applying options for * debug1: Connecting to /users/macbookpro/.ssh/[key-file].cer port 22. ssh: Could not resolve hostname /users/macbookpro/.ssh/[key-file].cer: nodename nor servname provided, or not known Connection closed Mar 2, 2023 at 13:04
  • 2
    -i in front of the path to the cert is quite a simple instruction imho, or check the man-page which says [-i identity_file]. ---> sftp -v -i ~/.ssh/[key-file].cer ubuntu@[IP address]
    – pLumo
    Mar 2, 2023 at 13:14

1 Answer 1

0

As suspected, MaxAuthTries was part of the problem.

First, I ran the command: /etc/ssh/sshd_config and removed the # to enable the line.

I followed the instructions in an answer to an existing question on Ask Ubuntu, and added the line: PubkeyAcceptedAlgorithms +ssh-rsa

Then I ran the command: sudo systemctl restart sshd and I was able to connect with Transmit without problem.

You must log in to answer this question.

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