Vagrant ssh doesn't display command prompt - linux

I have a computer that runs Windows 8.1 and for some projects I use Vagrnat and VirtualBox, however after upgrading VirtualBox and Vagrant, after running Vagrant ssh, vagrant doesn't display the command prompt. I thought that may be it's a problem related with old boxes so I've create a new VM but the results is the same.
As can be seen below, some commands return results and everything is fine:
sudo -i returns me that stdin: is not a tty:
Could you have a look please and give me an idea about how can I solve this problem?

Related

Terminal Text overlapping after SSH connecting in Ubuntu

I got a problem that the text in the terminal was always overlapping when I connected to Windows Server using SSH, How can I fix it?
Annother question, Would this issue affect expect or pexpect(python) ?
I tried the two ways to connect windows via SSH in Ubuntu 20.04, both are the same situation that I can't run normally.
Snapshot:
Here is run script by expect
NETWORK file was not created.

Can't launch Visual Studio Code on Ubuntu

I'm running a VM in Azure with Ubuntu 14.04. I've installed XFCE and use X2GO to remote desktop to the machine.
I've downloaded the VS Code and unzipped the files. When I run Code from a terminal I get the following error:
WouterDeKort#UbuntuDev:~/tools/web/visual-studio-code$ ./Code
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
WouterDeKort#UbuntuDev:~/tools/web/visual-studio-code$ [ , [Error: channel closed] ]
Any idea what I'm doing wrong?
DISCLAIMER ;-) I'm a total Linux newby. I've just installed Linux for the first time today and I have no idea what I'm doing ;-)
The work-a-round is in issue 3451. After running this, I was able to launch it from Debian Jessie with LXDE over X2Go.
sudo sed -i 's/BIG-REQUESTS/_IG-REQUESTS/' /usr/lib/x86_64-linux-gnu/libxcb.so.1
I have the same problem using X2GO and LXDE. Works okay (but slowly) using MobaXterm so apparently this is a problem specific to X2GO.
For anyone who still wonder what is the best choice if you want to start Visual Studio Code on a headless Ubuntu - the winning combination is:
Ubuntu Server + xfce + nomachine remote desktop
VS Code starts immediately without any hacks, you can set your resolution however you like, and nomachine is blazingly fast.

Vagrant ssh prompts 'no kex alg' and I'm unable to connect to the virtual machine

I'm trying to connect to a vagrant with a command vagrant ssh as instructed in the official vagrant documentation. Earlier I used older ubuntu as a virtual machine: config.vm.box = "hashicorp/precise32". During that time, issuing a command vagrant ssh did let me connect to the machine with just a username and password.
Now I changed the vagrant box to a newer one because I wanted newer nodejs. Currently, the box is: config.vm.box = "ubuntu/vivid32". Now with this box, if I run the vagrant, and try to connect to the machine with vagrant ssh, it does not let me, but instead it will prompt no kex alg. I read somewhere it has to do with authentication using keys. How could I connect to the new ubuntu with vagrant ssh? One option could be to just regularly connect to the box.
I just had this same issue for a couple days a finally found a way to fix this. I know its a old topic but just incase other people will experiance the same issue. this is how you can solve it:
edit your sshd_config and add:
KexAlgorithms diffie-hellman-group1-sha1
this is what fixed it for me (obviously restart ssh after that)
I guess something was done wrong in the box - when you look the history https://vagrantcloud.com/ubuntu/boxes/vivid32 there has been a few boxes released in short time. I just downloaded the box today and it is working as expected.
I suggest you update the box and you will get the latest version
vagrant box update --box ubuntu/vivid32
Checking for updates to 'ubuntu/vivid32'
Box 'ubuntu/vivid32' (v20151001.0.0) is the latest version
you should go to your vagrant using putty or anything
after that
sudo nano /etc/ssh/sshd_config
go to bottom line and put
KexAlgorithms diffie-hellman-group1-sha1
after that ctrl+o and enter and ctrl+x
go back to your windows and reload vagrant
then try
ssh vagrant#127.0.0.1 -p 2222
Hope this help you

open Teamviewer on a Debian machine via PuTTY on a Windows machine

hope everyone is doing well.
Got an issue I would like to pick the great brains in this forum about.
So, I have many Debian machines I often remote into using Teamviewer and a Windows machine, which works out great; however Teamviewer crashes for what appears to be no apparent reason. When such happens, normally I will PuTTY into the suspect Debian machine from a Windows 7 machine and issue the shutdown -r now command. When the debian computer reboots, so does Teamviewer and the suspect Debian machine is now visible in the "My computers" list on my Windows machine.
My question is this, why cant I just type teamviewer from the command line while PuTTYing into the Debian machine and have Teamviewer reopen on the Debian machine, making it visible in "My computers?" When I execute teamviewer command from PuTTY command line, I see the verbose output of teamviewer opening, but the machine never becomes visible in "My computers."
Now, I know it is possible to start Teamviewer remotely and have it show up back in 'My computers" list. I can do it via NoMachine; I simply connect to the suspect Debian machine and double click on the Teamviewer desktop launcher. However, NoMachine is very heavy and quite frankly, i just don't like it. I also know I can execute teamviewer via command line while sitting in front of the suspect Debian machine. PuTTY would be so much faster.
I have also tried VNC as well as X sessions. In both cases, i can open Teamviewer and it shows up in "My computers," but when I close the VNC of X, Teamviewer also closes and removes itself from "My computers."
Can someone help me figure out a way to restart Teamviewer via PuTTY please? Is there a way to open a desktop launcher via PuTTYs command line? Or is there a way to tell Teamviewer to execute in the suspect Debian machines active desktop session via PuTTYs command line?
Thanks all

SSH tunnelling into arch box

I have a raspberry pi running arch linux connected to the TV and want to run commands on that screen by SSH'ing from my Ubuntu machine elsewhere.
I have tried running the command SSH -Y root# and starting xclock as a test. However I get the following error:
No protocol specified
Error: Can't open display: :0
I then tried running "export DISPLAY=:0" on the arch machine, but this doesn't solve the issue.
I have X running fine and can see it on the TV and I have edited the file /etc/ssh/ssh_config to allow X11 forwarding.
Anyone know what I am doing wrong?
Many thanks
The ArchLinux wiki has some good instructions on setting things up. I struggled for a while until I found them, but for me the key was to set up SSH forwarding within sshd_config (most distros seem to enable this by default, but Arch doesn't).
Once you've enabled X forwarding in SSHD, I also found it helpful to install the dummy video driver for Xorg ("pacman -S xf86-video-dummy"), which gets rid of irritating errors about missing the RANDR extension. This might not be necessary if you already have it running a real X server locally on the Pi - personally, I'm running mine completely headless.
I've found that I don't have to worry about setting up the DISPLAY variable, or xhost, when running with 'ssh -X' from an iMac. I'd expect Ubuntu to behave the same.
looks like an authentication problem. The answer used to be
xhost +
on the console of the X display. Might help.
You probably want to set
export DISPLAY=[IP_ADDRESS_OF_ARCH_BOX]:0
on your Ubuntu box, then when you run xclock from your Ubuntu box, it'll forward the screen to the Arch box.

Resources