All posts by Michael Albert

Linux: X11 forwarding not working with putty

Hi,

you have properly configured putty to use X11 forwarding but it fails?

Continue reading Linux: X11 forwarding not working with putty

Linux: Use X11 forwarding with putty and su/sudo

Hi,

when you use X11 forwarding with PuTTY or ssh -X a TCP Socket is opened to which each user can connect. The connection to the X11 itself is protected by an authentification cookie.

Means when you add this cookie to the session launched by su you could use X11 forwarding.

An example. Connect to a linux machine as user michael (by putty or from another linux machine)

michael@debdev ~ # ssh -X michael@debdev1 

In the session of debdev1 list all xauth cookies.

michael@debdev1 ~ # xauth list
debdev1/unix:10  MIT-MAGIC-COOKIE-1  7ea68cc88e74c1697aa6c757504fc0d7 

Note: these cookies are stored the users home directory in file .Xauthority => ~/.Xauthority

Then switch to another user on this machine

michael@debdev1 ~ # sudo su helena

When you try to start a X11 client you got some errors like this

helena@debdev1 ~ # xterm
Can't connect to X11 window server using 'localhost:10.0' as the value of the DISPLAY variable.

Then verify you already have a ~/.Xauthority file

helena@debdev1 ~ # ls -l ~/.Xauthority

If not create a new file

helena@debdev1 ~ # touch ~/.Xauthority

and add the authentification cookie

helena@debdev1 ~ # xauth add debdev1/unix:10  MIT-MAGIC-COOKIE-1  7ea68cc88e74c1697aa6c757504fc0d7

Then you should be able to start X11 programs

Michael

VMware vSphere: Copy files to the VCSA (Linux) Appliance

Hi,

each user who migrated their Windows based vCenter Servers to the Linux based VCSA Appliance have the save problem. How can I copy files (for example certificates) to and from the VCSA.

The vSphere VCSA appliance have a builtin ssh daemon. Unfortunately it doesn’t support sftp/scp. If try to connect an
Error: Cannot initialize sftp protocol. occurs.

Continue reading VMware vSphere: Copy files to the VCSA (Linux) Appliance

Powershell: Change the title of the powershell window from a script

Hi,

sometimes it would be nice to see the status of a script in the title of the powershell window.
Continue reading Powershell: Change the title of the powershell window from a script

Windows: Manage applications with winget

Hi,

winget is a new tool from microsoft which acts as a package manager like apt, zypper or yum.

Installing winget (latest version on 26.01.2021 is 0.2.3162 Preview)
Continue reading Windows: Manage applications with winget