Invalid MIT-MAGIC-COOKIE-1 key

I can't seem to connect to Display VIA SSH. Using the same display as Desktop.

garuda-inxi:
https://termbin.com/60fx

System:
  Kernel: 6.4.4-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 13.1.1
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
    root=UUID=57122aaf-5f66-4abc-83d6-bf6287e05427 rw rootflags=subvol=@
    quiet rd.luks.uuid=45d1b06c-5944-4b2a-b044-3535488b69a7 quiet
    rd.udev.log_priority=3 vt.global_cursor_default=0
    rd.luks.uuid=eab39f3b-b31f-4e4b-9941-cfed48ce9e51
    resume=/dev/mapper/luks-eab39f3b-b31f-4e4b-9941-cfed48ce9e51 loglevel=3
    ibt=off
  Desktop: N/A wm: kwin_x11 dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 81DC v: Lenovo ideapad 330-15IKB
    serial: <superuser required> Chassis: type: 10 v: Lenovo ideapad 330-15IKB
    serial: <superuser required>
  Mobo: LENOVO model: LNVNB161216 v: NO DPK serial: <superuser required>
    UEFI: LENOVO v: 8RCN58WW date: 05/19/2021
Battery:
  ID-1: BAT0 charge: 30.0 Wh (100.0%) condition: 30.0/30.0 Wh (100.0%)
    volts: 8.5 min: 7.6 model: LGC L16C2PB2 type: Li-poly serial: <filter>
    status: charging
CPU:
  Info: model: Intel Core i3-7130U bits: 64 type: MT MCP arch: Amber/Kaby Lake
    note: check gen: core 7 level: v3 note: check built: 2017
    process: Intel 14nm family: 6 model-id: 0x8E (142) stepping: 9
    microcode: 0xF2
  Topology: cpus: 1x cores: 2 tpc: 2 threads: 4 smt: enabled cache:
    L1: 128 KiB desc: d-2x32 KiB; i-2x32 KiB L2: 512 KiB desc: 2x256 KiB
    L3: 3 MiB desc: 1x3 MiB
  Speed (MHz): avg: 1666 high: 2700 min/max: 400/2700 scaling:
    driver: intel_pstate governor: powersave cores: 1: 600 2: 2700 3: 665
    4: 2700 bogomips: 21599
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities: <filter>
Graphics:
  Device-1: Intel HD Graphics 620 vendor: Lenovo driver: i915 v: kernel
    arch: Gen-9.5 process: Intel 14nm built: 2016-20 ports: active: eDP-1
    empty: DP-1,HDMI-A-1,HDMI-A-2 bus-ID: 00:02.0 chip-ID: 8086:5916
    class-ID: 0300
  Device-2: Bison EasyCamera driver: uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-8:5 chip-ID: 5986:1127
    class-ID: 0e02 serial: <filter>
  Display: server: X.org v: 1.21.1.8 with: Xwayland v: 23.1.2
    compositor: kwin_x11 driver: X: loaded: modesetting
    alternate: fbdev,intel,vesa dri: iris gpu: i915 display-ID: :0
  Monitor-1: eDP-1 model: AU Optronics 0x41ec built: 2013 res: 1366x768
    dpi: 101 gamma: 1.2 size: 344x193mm (13.54x7.6") diag: 394mm (15.5")
    ratio: 16:9 modes: 1366x768
  API: OpenGL Message: No GL data found on this system.
Audio:
  Device-1: Intel Sunrise Point-LP HD Audio vendor: Lenovo
    driver: snd_hda_intel v: kernel alternate: snd_soc_skl,snd_soc_avs
    bus-ID: 00:1f.3 chip-ID: 8086:9d71 class-ID: 0403
  API: ALSA v: k6.4.4-zen1-1-zen status: kernel-api tools: N/A
  Server-1: PipeWire v: 0.3.74 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Lenovo driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1
    port: 3000 bus-ID: 02:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp2s0 state: down mac: <filter>
  Device-2: Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter
    vendor: Lenovo driver: ath10k_pci v: kernel pcie: gen: 1 speed: 2.5 GT/s
    lanes: 1 bus-ID: 03:00.0 chip-ID: 168c:0042 class-ID: 0280
  IF: wlp3s0 state: up mac: <filter>
Bluetooth:
  Device-1: Qualcomm Atheros driver: btusb v: 0.8 type: USB rev: 2.0
    speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-7:4 chip-ID: 0cf3:e500
    class-ID: e001
  Report: bt-adapter ID: hci0 rfk-id: 2 state: up address: <filter>
Drives:
  Local Storage: total: 577.55 GiB used: 9.68 GiB (1.7%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/sda maj-min: 8:0 vendor: Kingston model: SA400S37120G
    size: 111.79 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    tech: SSD serial: <filter> fw-rev: 0004 scheme: GPT
  ID-2: /dev/sdb maj-min: 8:16 vendor: Western Digital
    model: WD5000LPCX-24VHAT0 size: 465.76 GiB block-size: physical: 4096 B
    logical: 512 B speed: 6.0 Gb/s tech: HDD rpm: 5400 serial: <filter>
    fw-rev: 1A02 scheme: GPT
Partition:
  ID-1: / raw-size: 102.69 GiB size: 102.69 GiB (100.00%)
    used: 9.68 GiB (9.4%) fs: btrfs dev: /dev/dm-1 maj-min: 254:1
    mapped: luks-45d1b06c-5944-4b2a-b044-3535488b69a7
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 720 KiB (0.2%) fs: vfat dev: /dev/sda1 maj-min: 8:1
  ID-3: /home raw-size: 102.69 GiB size: 102.69 GiB (100.00%)
    used: 9.68 GiB (9.4%) fs: btrfs dev: /dev/dm-1 maj-min: 254:1
    mapped: luks-45d1b06c-5944-4b2a-b044-3535488b69a7
  ID-4: /var/log raw-size: 102.69 GiB size: 102.69 GiB (100.00%)
    used: 9.68 GiB (9.4%) fs: btrfs dev: /dev/dm-1 maj-min: 254:1
    mapped: luks-45d1b06c-5944-4b2a-b044-3535488b69a7
  ID-5: /var/tmp raw-size: 102.69 GiB size: 102.69 GiB (100.00%)
    used: 9.68 GiB (9.4%) fs: btrfs dev: /dev/dm-1 maj-min: 254:1
    mapped: luks-45d1b06c-5944-4b2a-b044-3535488b69a7
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 8.8 GiB used: 0 KiB (0.0%) priority: -2
    dev: /dev/dm-0 maj-min: 254:0
    mapped: luks-eab39f3b-b31f-4e4b-9941-cfed48ce9e51
  ID-2: swap-2 type: zram size: 7.67 GiB used: 0 KiB (0.0%) priority: 100
    dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 42.0 C pch: 44.5 C mobo: N/A
  Fan Speeds (RPM): N/A
Info:
  Processes: 237 Uptime: 1h 16m wakeups: 966 Memory: total: 8 GiB
  available: 7.67 GiB used: 3.49 GiB (45.6%) Init: systemd v: 253
  default: graphical tool: systemctl Compilers: gcc: 13.1.1 Packages:
  pm: pacman pkgs: 1295 libs: 357 tools: octopi,paru pm: rpm pkgs: 0
  Shell: Bash v: 5.1.16 running-in: sshd (SSH) inxi: 3.3.28
Garuda (2.6.16-1):
  System install date:     2023-07-22
  Last full system update: 2023-07-22 ↻
  Is partially upgraded:   No
  Relevant software:       snapper NetworkManager dracut
  Windows dual boot:       Probably (Run as root to verify)
  Failed units:            

ssh_config has X11 forwarding enabled.

Welcome :slight_smile:

Which Garuda Linux desktop you use?

Reboot and check again.

I’m afraid I don’t understand the problem, the question.

2 Likes

I do not understand what you are trying to do either. This thread has some suggestions for the error you are getting though: ssh - "Invalid MIT-MAGIC-COOKIE-1 key" when trying to run program remotely - Unix & Linux Stack Exchange

Try

xhost +local: 

before running it.

Or:

This one worked for me. So I’m leaving this answer here.

 export DISPLAY=:1.0

Or:

The value you’re using for DISPLAY is incorrect: if you don’t want to use SSH X forwarding, DISPLAY must indicate the IP address of your X server (the desktop you want to display programs on). On the remote, run

export DISPLAY=desktop:0

replacing desktop with your local hostname or IP address. You may also need to change your X server’s configuration to allow remote IP connections.

xhost +local: 

Isn't ideal in terms of security, but it works! Thank you

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.