FTP and SSH connection not possible

Enzo85

New Member
Dec 3, 2024
13
0
1
Hello,

I would like to be able to connect via SSH or FTP (sftp) to my proxmox server but I can't and I don't understand why.
I'm sure the username, password and ip address are correct. In addition, I've generated an ssh key pair on my local machine and I've passed the public key to my server, but it's still impossible to connect.

SSH error : Permission denied, please try again.
FTP error : Error: Unable to establish connection to server

I can't find a solution, but there shouldn't be a problem with permission.

Sincerely
 
Hello,

I would like to be able to connect via SSH or FTP (sftp) to my proxmox server but I can't and I don't understand why.
I'm sure the username, password and ip address are correct. In addition, I've generated an ssh key pair on my local machine and I've passed the public key to my server, but it's still impossible to connect.

SSH error : Permission denied, please try again.
FTP error : Error: Unable to establish connection to server

I can't find a solution, but there shouldn't be a problem with permission.

Sincerely
Hello Enzo. I'm sorry to hear that you are having difficulties. I'm assuming when you say "Proxmox Server", that you mean a virtual machine. What does
Code:
cat /etc/ssh/ssh_config
yield?
 
Then there should be a line or lines in your SSH configuration on your VM that say "PasswordAuthentication yes". Those lines could be commented. Can you login if you uncomment one or all of these lines?
 
I still get the same error in uncomment “PasswordAuthentication”.

I want to be able to connect to it on the SSH command line from my local physical machine using, for example, gitbash as a command prompt, but I also want to be able to connect via FTP with FileZilla on my local physical machine to retrieve files.
 
I still get the same error in uncomment “PasswordAuthentication”.

I want to be able to connect to it on the SSH command line from my local physical machine using, for example, gitbash as a command prompt, but I also want to be able to connect via FTP with FileZilla on my local physical machine to retrieve files.
And what does the SSH configuration yield?
 
Hello Enzo85, could you please try the following:
  1. Use the option -v (ssh -v your_user@your_server) to see detailed information about the error. Please post the exact output here.
  2. Just to be sure: did you make sure that the keyboard layout is set correctly? For new installations, many mistakes happen due to wrong keyboard layout. Just to be sure, you can also write the password in a document and copy it to the terminal.
 
Hello Enzo85, could you please try the following:
  1. Use the option -v (ssh -v your_user@your_server) to see detailed information about the error. Please post the exact output here.
  2. Just to be sure: did you make sure that the keyboard layout is set correctly? For new installations, many mistakes happen due to wrong keyboard layout. Just to be sure, you can also write the password in a document and copy it to the terminal.
Okay, it's already telling me that it's found my private key and that there's a match with the public key on the server.
Then I have no errors that would appear.
So I type in the password and I get this :

"
debug1: Authentications that can continue: publickey,password
debug1: No more authentication methods to try.
[user]@[ip]: Permission denied (publickey,password).
"
 
Alright, then it's time to increase verbosity level even further to pinpoint the issue. Could you please try the option -vvv (ssh -vvv your_user@your_server) and post what the output is?
 
Alright, then it's time to increase verbosity level even further to pinpoint the issue. Could you please try the option -vvv (ssh -vvv your_user@your_server) and post what the output is?
Yes, now I see that it's looking for several things in my .ssh file, but it's not finding any key ids, even though I've got my id_rsa and id_rsa.pub in there, which I've placed on my server myself.
 
It also can't find known_hosts on my pc and on the server.
So it must be my ssh key generation, right?
 
Just to be sure: are you sure that you set the permissions correctly? You can check the man page (call man ssh in your terminal) for exact details (or access an online version here). Alternatively, you can check this answer which provides a short overview: https://superuser.com/a/215506
 
As I said, everything works perfectly on another local physical machine with the same account, so yes, everything seems to be well configured.
 
As I said, everything works perfectly on another local physical machine with the same account, so yes, everything seems to be well configured.
So let me summarize: You have a VM setup from Proxmox VE and now you cannot SSH into the VM. I asked you for your SSH configuration to check whether certain options were enabled or not that would allow you to login seamlessly without having to manually configure any keys. Normally you issue the command to SSH into `root@IP-ADDRESS` and the VM would ask you for your password. `root` is the top-level user and requires authentication when one attempts to login as this user. If you have options in your SSH file that tell SSH on your VM, that when somebody (you in this case) attempts to login via SSH no password is required, this will not work, because the `root` user requires authentication in any case. If you have sorted the issue out, then I'm glad things work for you as you expect. If you are still having problems, however, I cannot really assist you any further without the SSH configuration on your VM.
 
So let me summarize: You have a VM setup from Proxmox VE and now you cannot SSH into the VM. I asked you for your SSH configuration to check whether certain options were enabled or not that would allow you to login seamlessly without having to manually configure any keys. Normally you issue the command to SSH into `root@IP-ADDRESS` and the VM would ask you for your password. `root` is the top-level user and requires authentication when one attempts to login as this user. If you have options in your SSH file that tell SSH on your VM, that when somebody (you in this case) attempts to login via SSH no password is required, this will not work, because the `root` user requires authentication in any case. If you have sorted the issue out, then I'm glad things work for you as you expect. If you are still having problems, however, I cannot really assist you any further without the SSH configuration on your VM.
I still haven't solved my problem, I still get a “permission denied” when I type in the right password, either for root or for the user I used to use, dev. What I may have forgotten to mention is that it worked before I reset my PC. At the time, I wasn't logging in with the password but with my passphrase that I'd chosen with my ssh connection.
 
I still haven't solved my problem, I still get a “permission denied” when I type in the right password, either for root or for the user I used to use, dev. What I may have forgotten to mention is that it worked before I reset my PC. At the time, I wasn't logging in with the password but with my passphrase that I'd chosen with my ssh connection.
In this case, fixing your problem is very simple. Before I detail steps on how to do this, please tell me which operating system you are running on the computer that you are trying to login to your VM from.