I am trying to access my virtual machine using ssh but it gives me the message "Permission denied, please try again".
What I want to do is use my ubuntu vm as server and my physical machine (windows 10 Home) as client, in order to connect to my server using ssh via password authentication method (not using keys). What I have done so far is:
1). I use VirtualBox and created an ubuntu 22.04.1 virtual machine. In the settings of VirtualBox I use Bridged Adapter at the Network sector.
2). I am a root user on my ubuntu. (I have not created other accounts).
3). On my ubuntu I installed ssh-server and started the ssh service.
4). At /etc/ssh in my sshd_config file I have:
- unchecked Port 22
- unchecked PasswordAuthentication yes
- unchecked PermitRootLogin and set it to yes.
- By default, KbdInteractiveAuthentication no is unchecked as well as UsePAM yes, X11Forwarding yes, PrintMotd no, AcceptEnv LANG LC_*, Subsystem sftp /usr/lib/openssh/sftp-server
5). On my windows 10 I have:
- Installed Client OpenSSH via powershell
- On Firewall advanced settings to Inbound and Outbound Firewall Rules I have enabled ICMPv4-In and ICMPv6-In, ICMPv4-Out and ICMPv6-Out.
6). I am running as the administrator on my windows. (I have not created other user accounts)
7). I am sure I have the correct IP adresses of both machines. I can ping my ubuntu vm from my windows. I can also ping my windows from my ubuntu vm. I have the usernames and passwords of both machines.
8). Using cmd on windows I try: ssh (username of ubuntu server)@(IP Address of ubuntu server)
I type the password and the result is: Permission denied, please try again.
On the third try it shows: Permission denied (publickey, password).
9). Checking the auth.log at /var/log I see this:
pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=(my windows IP) user=(my ubuntu's username)
Failed password for (ubuntu's username) from (my windows IP) port 61618 ssh2
The above message repeated 2 times.
Connection reset by authenticating user (ubuntu username) (windows IP) port 61618 [preauth]
PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=(my windows IP) user=(my ubuntu's username)
10). On cmd at windows typing ssh -v (ubuntu's username)@(ubuntu's IP) it shows me this: (I type the messages that seem they have error)
pubkey_prepare: ssh_get_authentication_socket: No such file or directory
kex_input_ext_info: [email protected] (unrecognised)
Next authentication method: password
debug1: read_passphrase: can't open /dev/tty: No such file or directory
Then it promts me to type the password for the ubuntu server (still failing ofc)
I apologize for the long post but I really need help.
Thank you in advanced.