Sample Header Ad - 728x90

Add the gpg key used to sign the packages by running the following wget | gpg | tee >/dev/null command

1 vote
1 answer
7441 views
I was preparing my Kali Linux to run a Tor's Middle Relay. I was doing Tor Project's Repository configuration according to this site . I made steps 1 and 2. The 3rd step was to add the gpg key used to sign the packages by running the following command:
sudo wget -qO- https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc  | gpg --dearmor | tee /usr/share/keyrings/tor-archive-keyring.gpg >/dev/null
The problem is I don't understand what this command does and why it fails, even though I execute it with
permissions.
┌──(michal㉿kali)-[/usr/share/keyrings]
└─$ sudo wget -qO- https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc  | gpg --dearmor | tee /usr/share/keyrings/tor-archive-keyring.gpg >/dev/null
[sudo] password for michal: tee: /usr/share/keyrings/tor-archive-keyring.gpg: Permission denied
This part with
, I understand. But I don't know what is happening after the tor repo gets downloaded to my vps.
┌──(michal㉿kali)-[/usr/share/keyrings]
└─$ ls -lah
total 176K
drwxr-xr-x   2 root root 4.0K Jan 28  2022 .
drwxr-xr-x 135 root root 4.0K Jan  3 18:09 ..
-rw-r--r--   1 root root 8.5K Feb 25  2021 debian-archive-bullseye-automatic.gpg
-rw-r--r--   1 root root 8.6K Feb 25  2021 debian-archive-bullseye-security-automatic.gpg
-rw-r--r--   1 root root 2.4K Feb 25  2021 debian-archive-bullseye-stable.gpg
-rw-r--r--   1 root root 8.0K Feb 25  2021 debian-archive-buster-automatic.gpg
-rw-r--r--   1 root root 8.0K Feb 25  2021 debian-archive-buster-security-automatic.gpg
-rw-r--r--   1 root root 2.3K Feb 25  2021 debian-archive-buster-stable.gpg
-rw-r--r--   1 root root  55K Feb 25  2021 debian-archive-keyring.gpg
-rw-r--r--   1 root root  37K Feb 25  2021 debian-archive-removed-keys.gpg
-rw-r--r--   1 root root 7.3K Feb 25  2021 debian-archive-stretch-automatic.gpg
-rw-r--r--   1 root root 7.3K Feb 25  2021 debian-archive-stretch-security-automatic.gpg
-rw-r--r--   1 root root 2.3K Feb 25  2021 debian-archive-stretch-stable.gpg
-rw-r--r--   1 root root 2.3K Jan 25  2022 kali-archive-keyring.gpg
┌──(michal㉿kali)-[/usr/share/keyrings]
└─$ lsb_release -a                                                                                                                                         1 ⨯
No LSB modules are available.
Distributor ID: Kali
Description:    Kali GNU/Linux Rolling
Release:        2022.4
Codename:       kali-rolling
Asked by michal roesler (289 rep)
Jan 3, 2023, 11:39 PM
Last activity: Jan 4, 2023, 05:01 PM