Outils pour utilisateurs

Outils du site


blog

Notes yubikey - accès SSH

Sur le client

Génération des paires de clefs

ssh-keygen -t ecdsa-sk
ssh-keygen -t ed25519-sk

Le code PIN de la clef vous est demandé. Appuyé sur la clef pour valider

Pour ne pas a avoir à appuyer sur la clef

ssh-keygen -t ecdsa-sk -no-touch-required
ssh-keygen -t ed25519-sk -no-touch-required

Sur le serveur

cat <<EOF >/etc/apt/sources.list.d/backports.list
deb http://ftp.debian.org/debian buster-backports main
EOF
 
apt-get update
apt-get install -t buster-backports ssh

Puis ajouter les fichiers *.pub à la suite de /home/jean/.ssh/authorized_keys

le chmod doit être 600.

si pb :

chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
2025/03/24 15:06

Notes Yggdrasil Network

Voir :

[Yggdrasil address miner in Golang]

Maintainer: @tdemin Git: https://git.tdem.in/tdemin/syg_go/ Wiki: http://[222:a8e4:50cd:55c:788e:b0a5:4e2f:a92c]/doku.php?id=yggdrasil:simpleygggen_go

[Yggdrasil address miner written in C++]

Yggdrasil 0.4 and higher

Git: https://notabug.org/acetone/SimpleYggGen-CPP/ Wiki: http://[222:a8e4:50cd:55c:788e:b0a5:4e2f:a92c]/doku.php?id=yggdrasil:simpleygggen_cpp

Debian: :

sudo apt-get install libsodium
yggdrasil -genconf > yggdrasil.conf

yggdrasil network peers public Changer peers

yggdrasil -useconf > yggdrasil.conf

Chercher yggdrasil internal services

2025/03/24 15:06

Notes Xorg

Voir aussi Wayland

PID de gnome-session /tmp/.X0-lock

Générer /root/xorg.conf.new

#Xorg :1 -configure
Xorg -configure

Pour désactiver une carte GPU

lspci
echo 1 > /sys/bus/pci/devices/[card device id]/remove

Voir https://github.com/dglt1/optimus-switch/issues/17

X -config /root/xorg.conf.new -retro
sudo Xorg -verbose -config /root/Xorg.conf
nvidia-xconfig --mode nvidia-auto-select

Pb

X: user not authorized to run the X server, aborting.

Solution

/etc/X11/Xwrapper.config

#allowed_users=console
allowed_users=anybody

Valeurs possibles pour allowed_users :

  • root
  • anybody
  • console
# dpkg-reconfigure x11-common
startx

Trouver le VendorName

Xorg.conf

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
EndSection
lspci -vmm 
systemd-logind returned paused fd for drm node

Xorg fail at boot But start if : “ctrl+alt+f3” and “ctrl+alt+f1”

Solution 1 - nolapic
# lspci
00:02.0 VGA compatible controller [0300]: Intel Corporation Device [8086:3e98]

/etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="quiet nolapic"
update-grub

Mais le nolapic crée des problèmes sur une des cartes réseaux

Solution 2 - décaler d'une second le démarrage de GDM

/etc/systemd/system/gdm3.service.d/gdm.conf

[Service]
ExecStartPre=/usr/bin/bash -c 'sleep 1'
2025/03/24 15:06

Notes X11 autorisations - xhost - Xauthority

Voir :

Voir aussi :

Exemple :

xhost local:web1

ou

$ xhost +
access control disabled, clients can connect from any host

Voir xauth (en utilisant le compte approprié)

xauth
su - jean -c 'xauth list'

Les infos lu provienne de ~/.Xauthority si

export XAUTHORITY=~/.Xauthority

Permanent xhost rule

/etc/profile.d/xhost.sh

if [ "$DISPLAY" != "" ]
then
        xhost +local:jean >/dev/null 2>&1
fi
 
true
chmod +x /etc/profile.d/xhost.sh

Pb

Pb serveur X11 avec ssh
X11 forwarding request failed on channel 0

http://ask.xmodulo.com/fix-broken-x11-forwarding-ssh.html

https://joshua.hoblitt.com/rtfm/2013/04/how_to_fix_x11_forwarding_request_failed_on_channel_0/

J'ai eu le même problème lors d'un chroot d'un serveur SSH. Pas moyen de lancer une application graphique avec ssh -X

/etc/ssh/sshd_config

X11Forwarding yes
X11UseLocalhost no

J'avais déjà X11Forwarding yes dans mon fichier.

Puis

/etc/init.d/ssh restart

Vérifier également que vous avez le paquet xauth d'installé sur la machine que vous vous connectez

Autres

$ ssh -X -Y remote-server
$ application-binary

To skip the intermediate terminal session, use the following command

ssh user@server -X -Y -C binary_application
Pb Plus de lancement graphique possible sous un autre compte utilisateur

Plus de lancement graphique possible après su ou sudo

après ssh -X serveur Puis xterm

X11 connection rejected because of wrong authentication.
Warning: This program is an suid-root program or is being run by the root user.
The full text of the error or warning message cannot be safely formatted
in this environment. You may get a more descriptive message by running the
program as a non-root user or by removing the suid bit on the executable.
xterm: Xt error: Can't open display: %s

Il faut copier le fichier .Xauthority présent dans le “home” de l'utilisateur.

Voir variable XAUTHORITY qui vaut par défaut $HOME/.Xauthority

Par exemple :

ssh -X plop@serveur
su -
cp /home/plop/.Xauthority ~
# export XAUTHORITY=/home/plop/.Xauthority
xterm
2025/03/24 15:06

Notes Wine

Voir aussi :

Voir également la version commerciale : https://www.codeweavers.com/products/crossover-linux Ce n'est pas libre, mais ca aide Wine qui lui est libre.

dpkg --add-architecture i386 && apt-get update
apt-get install wine32

~/.PlayOnLinux/

apt-get install mono-runtime wine playonlinux winetricks
apt-get install mono-complete
apt-get install cabextract
WINEARCH=win32 WINEPREFIX=/$HOME/.win32 winecfg
# ln -s /usr/bin/wine32 /usr/bin/wine
export WINEPREFIX=$HOME/.win32
export WINEARCH=win32
# export WINEDEBUG=warn+all
# export WINEDEBUG=fixme-all
## Perf
# export WINEDEBUG=-all

Voir https://doc.ubuntu-fr.org/wine_profils

winetricks --gui
env WINEARCH=win32 WINEPREFIX=/$HOME/.win32 winetricks list-installed

Installer un paquet MSI

wine msiexec /i wine-mono-4.7.3.msi

Install de Wine Mono

export WINEPREFIX=$HOME/.win32
export WINEARCH=win32 
wine msiexec /i wine-mono-4.7.3.msi

Pb

Exemple de cas tordu

http://www.silaexpert07.fr/silae/_deploy/http/www.silaexpert07.fr/80/SilaeClient_1_1138_0_4/SilaeClient.exe.manifest http://www.silaexpert07.fr/silae/_deploy/http/www.silaexpert07.fr/80/SilaeClient_1_1138_0_4/SilaeClient.exe

$ file SilaeClient.exe
SilaeClient.exe: PE32 executable (GUI) Intel 80386 Mono/.Net assembly, for MS Windows

Donc 32 bits

$ strings SilaeClient.exe  |grep -i \.net |head
Paint.NET v3.5.100
Paint.NET v3.5.100

Il faut le .NET v3.5

Avec Wine Mono

$ wine SilaeClient.exe 

Unhandled Exception:
System.IO.FileNotFoundException: Could not load file or assembly 'DevComponents.DotNetBar, Version=8.0.0.4, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
File name: 'DevComponents.DotNetBar, Version=8.0.0.4, Culture=neutral, PublicKeyToken=null'
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly 'DevComponents.DotNetBar, Version=8.0.0.4, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
File name: 'DevComponents.DotNetBar, Version=8.0.0.4, Culture=neutral, PublicKeyToken=null'

$ mono SilaeClient.exe 
WARNING: The runtime version supported by this application is unavailable.
Using default runtime: v4.0.30319

Unhandled Exception:
System.IO.FileNotFoundException: Could not load file or assembly or one of its dependencies.
File name: 'DevComponents.DotNetBar, Version=8.0.0.4, Culture=neutral, PublicKeyToken=null'

Il manquait les dépendances suivantes :

  • DevComponents.DotNetBar.dll
  • ExcelLibrary.dll
http://www.silaexpert07.fr/silae/_deploy/http/www.silaexpert07.fr/80/SilaeClient_1_1138_0_4/DevComponents.DotNetBar.dll
http://www.silaexpert07.fr/silae/_deploy/http/www.silaexpert07.fr/80/SilaeClient_1_1138_0_4/ExcelLibrary.dll 

Autres

Voir depends.exe http://www.dependencywalker.com/

Mono

mono --runtime=v4.0 application.exe

https://bugs.winehq.org/show_bug.cgi?id=30410

echo 0 |sudo tee /proc/sys/kernel/yama/ptrace_scope

DLL

#!/bin/sh
#
# Lanceur NetMeeting
/usr/bin/wine Rundll32.exe msconf.dll,OpenConfLink $1
2025/03/24 15:06
blog.txt · Dernière modification : de 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki