0

I'm running a Ubuntu 14 VM in Oracle Virtual Box on my host Windows 10 machine for a university assignment which runs mininet. Everything was working well until one day I woke up and tried to ssh into the VM and it logs me in (shows the welcome message) but the prompt does not show. Like it's just a flashing line which indicates I can type but if I press enter or anything my computer makes a beep sound and pressing Ctrl+D ends it.

I ssh using

ssh user@ip

and it was working perfectly literally a day before and I cannot recall making any changes that would ruin it. I've uninstalled the VM images and re-imported a fresh version, I've re-installed virtual box, and tried various settings inside the VM to get it to work but to no avail. I can ssh into the VM using PuTTy just fine but I need to use Visual Studio and it doesn't support PuTTy. I feel that the problem is with my host machine but I cannot figure out what it is.

Any tips on what I can do to try and fix it?

UPDATE with the -v command below. The connection closed after I manually closed it with Ctrl+D. The welcome message shows but then nothing after that just the cursor blinking.

PS C:\WINDOWS\system32> ssh -v  [email protected]
OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
debug1: Reading configuration data C:\\Users\\HP/.ssh/config
debug1: C:\\Users\\HP/.ssh/config line 1: Applying options for 192.168.56.10
debug1: Connecting to 192.168.56.10 [192.168.56.10] port 22.
debug1: Connection established.
debug1: identity file C:\\Users\\HP/.ssh/id_rsa type 0
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\HP/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\HP/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\HP/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\HP/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\HP/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\HP/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\HP/.ssh/id_ed25519-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\HP/.ssh/id_xmss type -1
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\HP/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_7.7
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2 pat OpenSSH_6.6.1* compat 0x04000000
debug1: Authenticating to 192.168.56.10:22 as 'cs551'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: [email protected]
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:wDmGnoAN/7DHHH1OTiFsKC3l4v5PYvxOm659KKLCDwk
debug1: Host '192.168.56.10' is known and matches the ECDSA host key.
debug1: Found key in C:\\Users\\HP/.ssh/known_hosts:1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 134217728 blocks
debug1: pubkey_prepare: ssh_get_authentication_socket: No such file or directory
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering public key: RSA SHA256:iMnIfpXDKQgmDCnJSUpBS1x4uOM3gXOa888wrKwkLDI C:\\Users\\HP/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: C:\\Users\\HP/.ssh/id_dsa
debug1: Trying private key: C:\\Users\\HP/.ssh/id_ecdsa
debug1: Trying private key: C:\\Users\\HP/.ssh/id_ed25519
debug1: Trying private key: C:\\Users\\HP/.ssh/id_xmss
debug1: Next authentication method: password
debug1: read_passphrase: can't open /dev/tty: No such file or directory
[email protected]'s password:
debug1: Authentication succeeded (password).
Authenticated to 192.168.56.10 ([192.168.56.10]:22).
debug1: channel 0: new [client-session]
debug1: Requesting [email protected]
debug1: Entering interactive session.
debug1: pledge: network
debug1: console doesn't support the ansi parsing
Welcome to Ubuntu 14.04.2 LTS (GNU/Linux 3.13.0-53-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

Last login: Tue Feb 16 06:16:59 2021 from 192.168.56.1

oot
eu: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype [email protected] reply 0
debug1: channel 0: free: client-session, nchannels 1
Connection to 192.168.56.10 closed.
Transferred: sent 2212, received 2552 bytes, in 64.7 seconds
Bytes per second: sent 34.2, received 39.5
debug1: Exit status 0
PS C:\WINDOWS\system32>
6
  • 1. Please check you have allotted sufficient storage space and memory to the VM. 2. Why Ubuntu 14 why not 20?
    – raghu
    Commented Feb 16, 2021 at 12:48
  • So if I'm reading correctly, the PuTTY SSH client works, but a different SSH client on Windows does not? Commented Feb 16, 2021 at 12:52
  • @raghu it's for an assignment so I don't have the choice
    – Shahmeer
    Commented Feb 16, 2021 at 13:01
  • @steeldriver yes you are right. I am using OpenSSH and it is not working but PuTTy is working fine
    – Shahmeer
    Commented Feb 16, 2021 at 13:02
  • 2
    try running ssh -v user@ip (-v is the verbose flag, you can add more (up to -v -v -v -v).. This may give you some idea of where ssh is hanging. Commented Feb 16, 2021 at 13:52

1 Answer 1

0

(1) Firstly, you can re-configure SSH server by running the following command on Linux box:

sudo dpkg-reconfigure openssh-server

If above command fails, simply regenerate SSH keys on the Linux box:

$ ssh-keygen -b 2048 -t rsa

(2) Secondly, you opened PowerShell (PS) as admin. You need to open PS as a regular user, where your existing SSH env variables are, then SSH will work again.

(3) Thirdly, get rid of the old SSH public keys from your Windows machine

$ ssh-keygen -R 192.168.56.10

(4) Then finally you can SSH as per normal.

10
  • thank you for the reply. I've done all the steps you've mentioned above and unfortunately I am still facing the same issue. The -v command output is also still the same. Any other ideas of what I can try?
    – Shahmeer
    Commented Feb 16, 2021 at 17:48
  • Try using CMD instead of PS Commented Feb 16, 2021 at 18:11
  • Are you using Windows 7 32bit? Commented Feb 16, 2021 at 18:21
  • I'm getting the same issue using cmd and no I am on Windows 10. Everything was working fine a day ago on this exact set up but for apparently no reason at all this issue has popped up
    – Shahmeer
    Commented Feb 16, 2021 at 20:58
  • The log output interestingly shows "OpenSSH_for_Windows_7.7p1" Commented Feb 16, 2021 at 21:08

You must log in to answer this question.

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