Score:3

Purpose of .wget-hsts file in Ubuntu

hm flag

There is a file in my home folder named wget-hsts .Does this file send my data to anywhere ? The file content is as follows :

# HSTS 1.0 Known Hosts database for GNU Wget.
# Edit at your own risk.
# <hostname>    <port>  <incl. subdomains>  <created>   <max-age>
raw.githubusercontent.com   0   0   1631759053  31536000
github.com  0   1   1631759053  31536000
github-releases.githubusercontent.com   0   0   1631759055  31536000

Why and How this file is created ? Is it anything harmful

Score:5
cn flag

HTTP Strict Transport Security, HSTS for short, is a mechanism to protect against certain kinds of attacks. HSTS allows web servers to specify that clients should only connect to them with encrypted connections.

Let's look at an example: You use your web browser to go to https://www.some-site.com. Note the https:// protocol prefix, it's an encrypted connection. If the admin of some-site.com has setup HSTS on their server, your webbrowser makes an internal note: "For this domain, only use encrypted connections in the future (until a date specified by the server)". So, if tomorrow you type http://www.some-site.com into your browser (note the unencrypted connection, http://), your browser will automatically "upgrade" to https://www.some-site.com.

As we've seen, your web browser has an internal list with entries like "For domain X, automatically switch to an encrypted connection until date Y". wget can handle HSTS as well, and also automatically "upgrade" connections. But wget has to store the list we've seen above somewhere, and that's what .wget-hsts is for.

According to your .wget-hsts file, you used wget to download something from github.com, for example. The entry was created at the timestamp 1631759053, and it is valid until the timestamp 31536000. HSTS will be applied for connections on any port, and it will be applied for connections to any subdomain of github.com.

hm flag
In easy word , you mean it's safe ?
cn flag
@yoMama33 It's not only safe, it's part of your security.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.