# What is the portsnap key for portsnap.FreeBSD.org?



## mackler (Mar 14, 2018)

I'm trying to configure portsnap(8).  In /etc/portsnap.conf I set:

`SERVERNAME=portsnap.FreeBSD.org`

I left KEYPRINT undefined since I don't know what it should be. Unsurprisingly, when I run `portsnap fetch`, I am told

`portsnap: Key must be given via -k option or configuration file.`

Where do I get the key (and where ought I to have looked for the answer to this question)?

Also: are there alternatives to (mirrors of) portsnap.FreeBSD.org?  How do I find them and, once found, how do I know which I can trust?


----------



## SirDice (Mar 14, 2018)

You don't need to configure portsnap(8), it works out of the box. The key is installed along with the OS.


```
# Trusted keyprint.  Changing this is a Bad Idea unless you've received
# a PGP-signed email from <security-officer@FreeBSD.org> telling you to
# change it and explaining why.
KEYPRINT=9b5feee6d69f170e3dd0a2c8e469ddbd64f13f978f2f3aede40c98633216c330
```



> Also: are there alternatives to (mirrors of) portsnap.FreeBSD.org?


No need, you're automatically directed to the "nearest" mirror. The URL resolves based on your GeoIP location.


----------



## mackler (Mar 14, 2018)

SirDice said:


> You don't need to configure portsnap(8), it works out of the box. The key is installed along with the OS.



It may work out of the box, but I'm on a VPS and my ISP gave me a modified portsnap.conf file with SERVERNAME set to their portsnap(8) mirror which is no longer available.  Apparently the key you quoted above works with portsnap.FreeBSD.org, so unless I'm confused about that thank you very much.


----------



## SirDice (Mar 14, 2018)

mackler said:


> I'm on a VPS and my ISP gave me a modified portsnap.conf file with SERVERNAME set to their portsnap(8) mirror which is no longer available.


Aye. Some VPS providers give you a highly modified image, there's no telling what else they changed until it breaks. That's one of the reasons why I like my current VPS provider, I get to do the install from original media myself.



> Apparently the key you quoted above works with portsnap.FreeBSD.org, so unless I'm confused about that thank you very much.


Yes, that key should be correct, I copied it from one of my machines (I'm certain those haven't been modified).


----------

