Score:1

linux SFTP client fails to connect

cn flag

I am attempting to connect a Centos7 linux server to a SFTP site for the intent of pulling files. The linux server is a Google Compute Engine (Virtual Machine). When connecting from my Google CE linux to the SFTP Server, I get the below error:

[Server1@airflow-pipeline User1]$ sftp [email protected]
Permission denied (password).
Couldn't read packet: Connection reset by peer
[Server1@airflow-pipeline User1]$ ssh [email protected]
Permission denied (password).
[Server1@airflow-pipeline User1]$

Note: code block sanitized

Historically, This kind of error indicates to me that the server is not allowing username/password authentication. However, if I do the same connection from my local development box (Mac m1 Max, Terminal), it works just fine. Additionally, from the development station, FileZilla connects immediately.

How can I troubleshoot this? Thank you

ca flag
Are you attempting password or pubkey auth? How is your M1 authenticating? What about FileZilla? pubkey or password?
cn flag
I use the same command line on both. SFTP user@host. For some reason the centos box gets this.
ca flag
So you have no idea how the server decides if you are you? You don't know how you configured neither the server nor your other clients? you don't even know if you use password login?
Score:3
nf flag

Run the ssh command in verbose mode (add -v option, which can be added up to 3 times to increase verbosity) on both machines (local M1 and linux server):

ssh -v [email protected]

You will then see exactly what key files (located in ~/.ssh) will be tried automatically. The difference between both verbose log outputs should lead to the solution. Please update your question with these log outputs if you cannot find the solution yourself.

Probably you have a private key on your local development machine that is allowed to access the FTP server, which is not present on the linux server.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.