Terminal Text overlapping after SSH connecting in Ubuntu - python-3.x

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.

Related

Vagrant ssh doesn't display command prompt

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?

How can I open a x-window application on a remote machine and make that window shown in my local machine

I have a remote server running Linux and I am using macOS. I can connect to that server through ssh command. I noticed that ssh -X is used to enable X11 forwarding. So I tried to connect to that server by running ssh -X name#ip-address command and launched an application on the connection terminal. I expect that window should be shown on my macOS but it didn't. Is there any other configuration I need to set in other to make the X11 forward works?
Macs don't run their GUI in X. You need to install XQuartz first.

XQuartz error on ssh connection

I'm connected to a remote Linux server via ssh, and I'm trying to execute ImageMagick's display command. I know that the problem is probably not on the server side, because when I connect from different machines I don't get the same problem. And I installed XQuartz on my local machine as well as connected using the ssh tags -Y and -X (neither fix the problem) and I'm still getting the following error. My computer is a MacBook Pro running El Capitan. Any idea?
display: unable to open X server `' # error/display.c/DisplayImageCommand/426.
Thanks!
I think the trick is to start XQuartz in the background on your Mac before you do anything and allow remote machines to connect.
So, on your Mac, in Terminal, start XQuartz:
X &
Now right-click the XQuartz icon in your Dock and click:
Applications -> Terminal
and in the Terminal that appears, type:
xhost +
Later, when you have it working, tighten up the security on the xhost command by being a bit more specific with IP addresses.

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