0

I have a work computer (Ubuntu) and a personal computer (win11 with Ubuntu WSL, port forwarding enabled). Using Termux in Android, I wrote the public key of my phone to the authorized_keys files in both computers. All devices use NordVpn Meshnet. I have absolutely no problem connecting to both of my computers (WSL and Ubuntu) from my phone using ssh (using IP adresses provided by Meshnet).

However, for some reason, I can't use ssh from home pc to work pc or vice versa. In powershell, I can succesfully enter my passwort, but the terminal freezes after the login. Using the ssh command with -vvv does not give any useful information, as the login is successful. However, when I use the flags --noprofile --norc, I can actually use the terminal. Also, alternatively, deleting the .bashrc file works fine on PS, but not on PuTTY or WSL.

How can I solve this weird problem? What confuses me is the fact everything works fine on Termux...

Edit: output of the ssh -vvv command:

debug2: we sent a password packet, wait for reply debug3: receive packet: type 52 Authenticated to ozanuni ([100.92.250.99]:22) using "password". debug1: channel 0: new session [client-session] (inactive timeout: 0) debug3: ssh_session2_open: channel_new: 0 debug2: channel 0: send open debug3: send packet: type 90 debug1: Requesting [email protected] debug3: send packet: type 80 debug1: Entering interactive session. debug1: pledge: filesystem debug3: client_repledge: enter debug1: ENABLE_VIRTUAL_TERMINAL_INPUT is supported. Reading the VTSequence from console debug3: This windows OS supports conpty debug1: ENABLE_VIRTUAL_TERMINAL_PROCESSING is supported. Console supports the ansi parsing debug3: Successfully set console output code page from:65001 to 65001 debug3: Successfully set console input code page from:437 to 65001 debug3: receive packet: type 80 debug1: client_input_global_request: rtype [email protected] want_reply 0 debug3: client_input_hostkeys: received RSA key SHA256:0j/kHaEbqWXqzkVzmRR8GeskJSn4Z/SZ2tAJxPQF8qo debug3: client_input_hostkeys: received ECDSA key SHA256:gx1i7D8XZddgS3yH50B4CUSqEr/f8he1YuPMVknixWE debug3: client_input_hostkeys: received ED25519 key SHA256:ALAofEX3aZunUm4cIPskff1I0hYurbwivXpie/rtO4M debug1: client_input_hostkeys: searching C:\\Users\\ozzwt/.ssh/known_hosts for ozanuni / (none) debug3: hostkeys_foreach: reading file "C:\\Users\\ozzwt/.ssh/known_hosts" debug3: hostkeys_find: found ssh-ed25519 key at C:\\Users\\ozzwt/.ssh/known_hosts:10 debug3: hostkeys_find: found ssh-rsa key at C:\\Users\\ozzwt/.ssh/known_hosts:11 debug3: hostkeys_find: found ecdsa-sha2-nistp256 key at C:\\Users\\ozzwt/.ssh/known_hosts:12 debug1: client_input_hostkeys: searching C:\\Users\\ozzwt/.ssh/known_hosts2 for ozanuni / (none) debug3: Failed to open file:C:/Users/ozzwt/.ssh/known_hosts2 error:2 debug1: client_input_hostkeys: hostkeys file C:\\Users\\ozzwt/.ssh/known_hosts2 does not exist debug3: client_input_hostkeys: 3 server keys: 0 new, 3 retained, 0 incomplete match. 0 to remove debug1: client_input_hostkeys: no new or deprecated keys from server debug3: client_repledge: enter debug3: receive packet: type 91 debug2: channel_input_open_confirmation: channel 0: callback start debug2: fd 3 setting TCP_NODELAY debug2: client_session2_setup: id 0 debug2: channel 0: request pty-req confirm 1 debug3: send packet: type 98 debug2: channel 0: request shell confirm 1 debug3: send packet: type 98 debug3: client_repledge: enter debug1: pledge: fork debug2: channel_input_open_confirmation: channel 0: callback done debug2: channel 0: open confirm rwindow 0 rmax 32768 debug3: receive packet: type 99 debug2: channel_input_status_confirm: type 99 id 0 debug2: PTY allocation request accepted on channel 0 debug2: channel 0: rcvd adjust 2097152 debug3: receive packet: type 99 debug2: channel_input_status_confirm: type 99 id 0 debug2: shell request accepted on channel 0 Welcome to Ubuntu 24.04.2 LTS (GNU/Linux 6.8.0-60-generic x86_64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/pro 1 device has a firmware upgrade available. Run fwupdmgr get-upgrades for more information. Expanded Security Maintenance for Applications is not enabled. 34 updates can be applied immediately. To see these additional updates run: apt list --upgradable 14 additional security updates can be applied with ESM Apps. Learn more about enabling ESM Apps service at https://ubuntu.com/esm 1 device has a firmware upgrade available. Run fwupdmgr get-upgrades for more information. Last login: Fri Jun 13 00:35:35 2025 from 100.92.251.74 debug3: obfuscate_keystroke_timing: starting: interval ~20ms debug3: obfuscate_keystroke_timing: stopping: chaff time expired (70 chaff packets sent) 
4
  • Have you tried to check the sshd logs on server side? Commented Jun 13 at 13:20
  • Can you add the full ssh -vvv output to your question anyways? It's helpful to see exactly where your terminal is freezing at. Have you tried setting up key pairs for the other devices as well? Commented Jun 13 at 13:53
  • @Cpt.Whale I have added the -vvv output after I have typed my password :) Commented Jun 14 at 11:35
  • @Robert i can do that the day after tomorrow, until then unfortunately not :( Commented Jun 14 at 11:37

1 Answer 1

1

Check the sshd_config file located at $Env:ProgramData\ssh Make sure password authentication is enabled: PasswordAuthentication yes

Create the SSH subsystem that hosts a PowerShell process on the remote computer: Subsystem powershell C:/progra~1/powershell/7/pwsh.exe -sshs

After the change you need to restart the SSHD service:

Restart-Service sshd 

Further the 8.3-style name for Program Files should be c:\progra~1, check this with the following command:

Get-CimInstance Win32_Directory -Filter 'Name="C:\\Program Files"' | Select-Object EightDotThreeFileName 

Let me know if this works for you.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.