Showing posts with label ssh. Show all posts
Showing posts with label ssh. Show all posts

2021-09-13

m3400 - X11 Forwarding for Desktop over SSH

 

X11 Forwarding for Desktop over SSH

Type the command below, which will activate xinit in virtual terminal 8. Note that you will be automatically switched to virtual terminal 8. You can switch back to the original virtual terminal 7 by pressing Ctrl+Alt+F7.

# xinit -- :1 &

After switching to virtual terminal 8, execute the following command to launch the RPi desktop remotely. Type pi user password when asked (see picture below).

# DISPLAY=:1 ssh -X pi@192.168.2.5 lxsession

You will bring to your new virtual terminal 8 the remote RPi desktop, as well as a small terminal launched from your active virtual terminal 7 (see picture below).

Remember, do not close that terminal. Otherwise, your RPi desktop will close immediately.

You can move between first and second virtual terminals by pressing Ctrl+Alt+F7 or Ctrl+Alt+F8.

https://www.xmodulo.com/remote-control-raspberry-pi.html

virtual terminal 7 - vt7

root@slitaz:~# xinit -- :1 &
root@slitaz:~#

X.Org X Server 1.19.3
Release Date: 2017-03-15
X Protocol Version 11, Revision 0
Build Operating System: SliTaz GNU/Linux
Current Operating System: Linux slitaz 5.4.41-slitaz #1 SMP Sat Aug 29 08:07:49 CST 2020 x86_64
Kernel command line: BOOT_IMAGE=/efi/boot/vmlinuz-5.4.41-slitaz root=/dev/null autologin
Build Date: 15 March 2018 04:57:16PM

Current version of pixman: 0.34.0
Before reporting problems, check http://www.slitaz.org/
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.1.log", Time: Sat Sep 4 11:54:59 2021
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"


root@slitaz:~# ps ax | grep -B 1 -A 5 Xorg

 2636 ?        Ss     0:00 /usr/bin/slim -d
 2642 tty7     Ssl+   1:09 /usr/libexec/Xorg -auth /var/run/slim.auth vt07
 2657 ?        Sl     0:04 /usr/bin/openbox --startup /usr/lib/openbox/openbox-autostart OPENBOX
 2695 ?        S      0:00 dbus-launch --sh-syntax --exit-with-session openbox-session
 2696 ?        Ss     0:00 /usr/bin/dbus-daemon --fork --print-pid 6 --print-address 8 --session
 2709 ?        Sl     0:00 /usr/libexec/gvfsd
 2714 ?        Sl     0:00 /usr/libexec/gvfsd-fuse /home/tux/.gvfs -f -o big_writes
--
 4364 pts/0    S      0:00 xinit -- :1
 4366 tty8     S<sl+   0:00 /usr/libexec/Xorg :1
 4380 pts/0    S      0:00 xterm -geometry +1+1 -n login
 4381 pts/1    Ss     0:00 sh
 4383 ?        I      0:00 [kworker/3:2-events]
 4384 pts/1    S+     0:01 ssh -Y tux@192.168.0.192 openbox-session
 4389 ?        I      0:00 [kworker/4:0-events]
 4396 pts/0    R+     0:00 ps ax
 4398 pts/0    S+     0:00 grep -B 1 -A 5 Xorg
root@slitaz:~# 




virtual terminal 8 - vt8

login - xterm
root@slitaz:~# DISPLAY=:1 ssh -Y tux@192.168.0.192 openbox-session

Secure login on SliTaz GNU/Linux powered by Dropbear SSH server.
tux@192.168.0.192's password:
Warning: No xauth data; using fake authentication data for X11 forwarding.
Obt-Message: Failed to open an Input Method
DBUS_SESSION_BUS_ADDRESS='unix:abstract=/tmp/dbus-AbPhdIjHlc,guid=b322887fba9877e40478d99861333d77';
export DBUS_SESSION_BUS_ADDRESS;
DBUS_SESSION_BUS_PID=6567;
DBUS_SESSION_BUS_WINDOWID=8388609;

(pcmanfm:6548): GLib-CRITICAL **: g_file_test: assertion 'filename != NULL' failed

(pcmanfm:6548): GLib-CRITICAL **: g_file_test: assertion 'filename != NULL' failed

(pcmanfm:6548): GLib-CRITICAL **: g_file_test: assertion 'filename != NULL' failed

SliTaz x86_64 - sakura
~ $ lxpanel -p slitaz &

~ $
(lxpanel:6669): Wnck-WARNING **: Unhandled action type _OB_WM_ACTION_UNDECORATE

(lxpanel:6669): Wnck-WARNING **: Unhandled action type _OB_WM_ACTION_UNDECORATE

~ $ echo $DISPLAY
localhost:10.0

~ $ env | egrep 'SSH|DIS'
SSH_CLIENT=192.168.0.191 59020 22
DISPLAY=localhost:10.0
SSH_CONNECTION=192.168.0.191 59020 192.168.0.192 22
~ $




https://forum.slitaz.org/topic/slitaz-x86_64-asus-m3400qa/page/2#post-50274


2021-09-11

m3400 - X11 Forwarding over sshx

 

X11 Forwarding over sshx

Dropbear and the X server

Dropbear supports X11 tunneling on the server side only. The client dbclient has no support for X11 tunneling. SliTaz provides a tiny shell script named /usr/bin/sshx to do the work. It opens a terminal with remote X11 protocol support if the environment variable DISPLAY is set. You can launch any remote X windows application on this terminal.

https://doc.slitaz.org/en:handbook:ssh#dropbear-and-the-x-server

tux@slitaz:~$ sshx tux@192.168.0.192

dbclient:
Host '192.168.0.192' key accepted unconditionally.
(ecdsa-sha2-nistp256 fingerprint md5 fc:6e:2b:c2:d7:68:46:d8:92:62:ef:e0:37:8d:8c:55)

Secure login on SliTaz GNU/Linux powered by Dropbear SSH server.

tux@192.168.0.192's password:

switch to xterm
tux@slitaz:~$ echo $DISPLAY
localhost:77.0

tux@slitaz:~$ env | egrep 'SSH|DIS'
SSH_CLIENT=192.168.0.191 46322 22
DISPLAY=localhost:77.0
SSH_CONNECTION=192.168.0.191 46322 192.168.0.192 22

tux@slitaz:~$ leafpad /usr/bin/sshx






https://forum.slitaz.org/topic/slitaz-x86_64-asus-m3400qa/page/2#post-50271

m3400 - X11 Forwarding over SSH

 

X11 Forwarding over SSH

Dropbear server implements X11 forwarding, and
authentication-agent forwarding for OpenSSH clients

https://matt.ucc.asn.au/dropbear/dropbear.html

tux@slitaz:~$ ssh -V
OpenSSH_7.6p1, OpenSSL 1.1.0g 2 Nov 2017

tux@slitaz:~$ grep -B 1 XAuth /etc/ssh_config
Host *
XAuthLocation /usr/bin/xauth

tux@slitaz:~$ ssh -Y root@192.168.0.192

Secure login on SliTaz GNU/Linux powered by Dropbear SSH server.
root@192.168.0.192's password:

Welcome to the Open Source World!

SliTaz GNU/Linux is distributed in the hope that it will be useful,
but with ABSOLUTELY NO WARRANTY.

root@slitaz:~# echo $DISPLAY
localhost:10.0

root@slitaz:~# leafpad test.txt




https://forum.slitaz.org/topic/slitaz-x86_64-asus-m3400qa/page/2#post-50270