Git Product home page Git Product logo

til's Introduction

$ til

github issues github stars

welcome to my "today i learned" repository - it's filled with short entries of information for my own reference & retention 📓

vim • webdev • terminal • networking • concepts

graph TD
    A[til] -->|14 notes| B{tags}
    B -->|3 notes| D[vim]
    B -->|5 notes| E[webdev]
    B -->|2 notes| F[concepts]
    B -->|1 note| G[networking]
    B -->| 3 notes| H[terminal]

vim

webdev

terminal

networking

concepts

python

til's People

Contributors

tg-z avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

til's Issues

Categories of Free and Nonfree Software - GNU Project - Free Software Foundation

Categories of free and nonfree software

Also see Confusing Words which You Might Want to Avoid.

This diagram, originally by Chao-Kuei and updated by several others since, explains the different categories of software. It's available as a Scalable Vector Graphic and as an XFig document, under the terms of any of the GNU GPL v2 or later, the GNU FDL v1.2 or later, or the Creative Commons Attribution-Share Alike v2.0 or later.

Free software

Free software is software that comes with permission for anyone to use, copy, and/or distribute, either verbatim or with modifications, either gratis or for a fee. In particular, this means that source code must be available. “If it's not source, it's not software.” This is a simplified description; see also the full definition.

If a program is free, then it can potentially be included in a free operating system such as GNU, or free versions of the GNU/Linux system.

There are many different ways to make a program free—many questions of detail, which could be decided in more than one way and still make the program free. Some of the possible variations are described below. For information on specific free software licenses, see the license list page.

Free software is a matter of freedom, not price. But proprietary software companies typically use the term “free software” to refer to price. Sometimes they mean that you can obtain a binary copy at no charge; sometimes they mean that a copy is bundled with a computer that you are buying, and the price includes both. Either way, it has nothing to do with what we mean by free software in the GNU project.

Because of this potential confusion, when a software company says its product is free software, always check the actual distribution terms to see whether users really have all the freedoms that free software implies. Sometimes it really is free software; sometimes it isn't.

Many languages have two separate words for “free” as in freedom and “free” as in zero price. For example, French has “libre” and “gratuit”. Not so English; there is a word “gratis” that refers unambiguously to price, but no common adjective that refers unambiguously to freedom. So if you are speaking another language, we suggest you translate “free” into your language to make it clearer. See our list of translations of the term “free software” into various other languages.

Free software is often more reliable than nonfree software.

Open source software

The term “open source” software is used by some people to mean more or less the same category as free software. It is not exactly the same class of software: they accept some licenses that we consider too restrictive, and there are free software licenses they have not accepted. However, the differences in extension of the category are small: we know of only a few cases of source code that is open source but not free. In principle it could happen that some free programs are rejected as open source, but we don't know if that has ever happened.

We prefer the term “free software” because it refers to freedom—something that the term “open source“ does not do.

Public domain software

Public domain software is software that is not copyrighted. If the source code is in the public domain, that is a special case of noncopylefted free software, which means that some copies or modified versions may not be free at all.

In some cases, an executable program can be in the public domain but the source code is not available. This is not free software, because free software requires accessibility of source code. Meanwhile, most free software is not in the public domain; it is copyrighted, and the copyright holders have legally given permission for everyone to use it in freedom, using a free software license.

Sometimes people use the term “public domain” in a loose fashion to mean “free” or “available gratis.” However, “public domain” is a legal term and means, precisely, “not copyrighted”. For clarity, we recommend using “public domain” for that meaning only, and using other terms to convey the other meanings.

Under the Berne Convention, which most countries have signed, anything written down is automatically copyrighted. This includes programs. Therefore, if you want a program you have written to be in the public domain, you must take some legal steps to disclaim the copyright on it; otherwise, the program is copyrighted.

Copylefted software

Copylefted software is free software whose distribution terms ensure that all copies of all versions carry more or less the same distribution terms. This means, for instance, that copyleft licenses generally disallow others to add additional requirements to the software (though a limited set of safe added requirements can be allowed) and require making source code available. This shields the program, and its modified versions, from some of the common ways of making a program proprietary.

Some copyleft licenses, such as GPL version 3, block other means of turning software proprietary, such as tivoization.

In the GNU Project, we copyleft almost all the software we write, because our goal is to give every user the freedoms implied by the term “free software.” See our copyleft article for more explanation of how copyleft works and why we use it.

Copyleft is a general concept; to copyleft an actual program, you need to use a specific set of distribution terms. There are many possible ways to write copyleft distribution terms, so in principle there can be many copyleft free software licenses. However, in actual practice nearly all copylefted software uses the GNU General Public License. Two different copyleft licenses are usually “incompatible”, which means it is illegal to merge the code using one license with the code using the other license; therefore, it is good for the community if people use a single copyleft license.

Noncopylefted free software

Noncopylefted free software comes from the author with permission to redistribute and modify, and also to add additional restrictions to it.

If a program is free but not copylefted, then some copies or modified versions may not be free at all. A software company can compile the program, with or without modifications, and distribute the executable file as a proprietary software product.

The X Window System illustrates this. The X Consortium released X11 with distribution terms that made it noncopylefted free software, and subsequent developers have mostly followed the same practice. A copy which has those distribution terms is free software. However, there are nonfree versions as well, and there are (or at least were) popular workstations and PC graphics boards for which nonfree versions are the only ones that work. If you are using this hardware, X11 is not free software for you. The developers of X11 even made X11 nonfree for a while; they were able to do this because others had contributed their code under the same noncopyleft license.

Lax permissive licensed software

Lax permissive licenses include the X11 license and the two BSD licenses. These licenses permit almost any use of the code, including distributing proprietary binaries with or without changing the source code.

GPL-covered software

The GNU GPL (General Public License) is one specific set of distribution terms for copylefting a program. The GNU Project uses it as the distribution terms for most GNU software.

To equate free software with GPL-covered software is therefore an error.

The GNU operating system

The GNU operating system is the Unix-like operating system, which is entirely free software, that we in the GNU Project have developed since 1984.

A Unix-like operating system consists of many programs. The GNU system includes all of the official GNU packages. It also includes many other packages, such as the X Window System and TeX, which are not GNU software.

The first test release of the complete GNU system was in 1996. This includes the GNU Hurd, our kernel, developed since 1990. In 2001 the GNU system (including the GNU Hurd) began working fairly reliably, but the Hurd still lacks some important features, so it is not widely used. Meanwhile, the GNU/Linux system, an offshoot of the GNU operating system which uses Linux as the kernel instead of the GNU Hurd, has been a great success since the 90s. As this shows, the GNU system is not a single static set of programs; users and distributors may select different packages according to their needs and desires. The result is still a variant of the GNU system.

Since the purpose of GNU is to be free, every single component in the GNU operating system is free software. They don't all have to be copylefted, however; any kind of free software is legally suitable to include if it helps meet technical goals.

GNU programs

“GNU programs” is equivalent to GNU software. A program Foo is a GNU program if it is GNU software. We also sometimes say it is a “GNU package”.

GNU software

GNU software is software that is released under the auspices of the GNU Project. If a program is GNU software, we also say that it is a GNU program or a GNU package. The README or manual of a GNU package should say it is one; also, the Free Software Directory identifies all GNU packages.

Most GNU software is copylefted, but not all; however, all GNU software must be free software.

Some GNU software was written by staff of the Free Software Foundation, but most GNU software comes from many volunteers. (Some of these volunteers are paid by companies or universities, but they are volunteers for us.) Some contributed software is copyrighted by the Free Software Foundation; some is copyrighted by the contributors who wrote it.

FSF-copyrighted GNU software

The developers of GNU packages can transfer the copyright to the FSF, or they can keep it. The choice is theirs.

If they have transferred the copyright to the FSF, the program is FSF-copyrighted GNU software, and the FSF can enforce its license. If they have kept the copyright, enforcing the license is their responsibility.

The FSF does not accept copyright assignments of software that is not an official GNU package, as a rule.

Nonfree software

Nonfree software is any software that is not free. Its use, redistribution or modification is prohibited, or requires you to ask for permission, or is restricted so much that you effectively can't do it freely.

Proprietary software

Proprietary software is another name for nonfree software. In the past we subdivided nonfree software into “semifree software”, which could be modified and redistributed noncommercially, and “proprietary software”, which could not be. But we have dropped that distinction and now use “proprietary software” as synonymous with nonfree software.

The Free Software Foundation follows the rule that we cannot install any proprietary program on our computers except temporarily for the specific purpose of writing a free replacement for that very program. Aside from that, we feel there is no possible excuse for installing a proprietary program.

For example, we felt justified in installing Unix on our computer in the 1980s, because we were using it to write a free replacement for Unix. Nowadays, since free operating systems are available, the excuse is no longer applicable; we do not use any nonfree operating systems, and any new computer we install must run a completely free operating system.

We don't insist that users of GNU, or contributors to GNU, have to live by this rule. It is a rule we made for ourselves. But we hope you will follow it too, for your freedom's sake.

Freeware

The term “freeware” has no clear accepted definition, but it is commonly used for packages which permit redistribution but not modification (and their source code is not available). These packages are not free software, so please don't use “freeware” to refer to free software.

Shareware

Shareware is software which comes with permission for people to redistribute copies, but says that anyone who continues to use a copy is required to pay a license fee.

Shareware is not free software, or even semifree. There are two reasons it is not:

  • For most shareware, source code is not available; thus, you cannot modify the program at all.
  • Shareware does not come with permission to make a copy and install it without paying a license fee, not even for individuals engaging in nonprofit activity. (In practice, people often disregard the distribution terms and do this anyway, but the terms don't permit it.)

Private software

Private or custom software is software developed for one user (typically an organization or company). That user keeps it and uses it, and does not release it to the public either as source code or as binaries.

A private program is free software (in a somewhat trivial sense) if its sole user has the four freedoms. In particular, if the user has full rights to the private program, the program is free. However, if the user distributes copies to others and does not provide the four freedoms with those copies, those copies are not free software.

Free software is a matter of freedom, not access. In general we do not believe it is wrong to develop a program and not release it. There are occasions when a program is so important that one might argue that withholding it from the public is doing wrong to humanity. However, such cases are rare. Most programs are not that important, and declining to release them is not particularly wrong. Thus, there is no conflict between the development of private or custom software and the principles of the free software movement.

Nearly all employment for programmers is in development of custom software; therefore most programming jobs are, or could be, done in a way compatible with the free software movement.

Commercial software

“Commercial” and “proprietary” are not the same! Commercial software is software developed by a business as part of its business. Most commercial software is proprietary, but there is commercial free software, and there is noncommercial nonfree software.

For example, GNU Ada is developed by a company. It is always distributed under the terms of the GNU GPL, and every copy is free software; but its developers sell support contracts. When their salesmen speak to prospective customers, sometimes the customers say, “We would feel safer with a commercial compiler.” The salesmen reply, “GNU Ada is a commercial compiler; it happens to be free software.”

For the GNU Project, the priorities are in the other order: the important thing is that GNU Ada is free software; that it is commercial is just a detail. However, the additional development of GNU Ada that results from its being commercial is definitely beneficial.

Please help spread the awareness that free commercial software is possible. You can do this by making an effort not to say “commercial” when you mean “proprietary.”
https://www.gnu.org/philosophy/categories.html#ProprietarySoftware

GitSheet

A dead simple git cheatsheet. Follow @tiivik for updates!

Branches.
git branch List all local branches.
git branch -a List remote and local branches.
git checkout -b branch_name Create a local branch and switch to it.
git checkout branch_name Switch to an existing branch.
git push origin branch_name Push branch to remote.
git branch -m new_name Rename current branch.
git branch -d branch_name Delete a local branch.
git push origin :branch_name Delete a remote branch.
Logs.
--- --- ---
git log --oneline Show commit history in single lines.
git log -2 Show commit history for last N commits.
git log -p -2 Show commit history for last N commits with diff.
git diff Show all local file changes in the working tree.
git diff myfile Show changes made to a file.
git blame myfile Show who changed what & when in a file.
git remote show origin Show remote branches and their mapping to local.
Cleanup.
--- --- ---
git clean -f Delete all untracked files.
git clean -df Delete all untracked files and directories.
git checkout -- . Undo local modifications to all files.
git reset HEAD myfile Unstage a file.
Tags.
--- --- ---
git pull --tags Get remote tags.
git checkout tag_name Switch to an existing tag.
git tag List all tags.
git tag -a tag_name -m "tag message" Create a new tag.
git push --tags Push all tags to remote repo.
Stashes.
--- --- ---
git stash save "stash name" && git stash Save changes to a stash.
git stash list List all stashes.
git stash pop Apply a stash and delete it from stash list.

https://gitsheet.wtf/?ref=producthunt

Philosophy of the GNU Project - GNU Project - Free Software Foundation

Philosophy of the GNU Project

See audio-video.gnu.org for recordings of Richard Stallman's speeches.

Free software means that the software's users have freedom. (The issue is not about price.) We developed the GNU operating system so that users can have freedom in their computing.

Specifically, free software means users have the four essential freedoms: (0) to run the program, (1) to study and change the program in source code form, (2) to redistribute exact copies, and (3) to distribute modified versions.

Software differs from material objects—such as chairs, sandwiches, and gasoline—in that it can be copied and changed much more easily. These facilities are why software is useful; we believe a program's users should be free to take advantage of them, not solely its developer.

For further reading, please select a section from the menu above.

We also maintain a list of most recently added articles.

Introduction

Glenn Greenwald: Why privacy matters | TED Talk

Glenn Greenwald: Why privacy matters

https://www.ted.com/talks/glenn_greenwald_why_privacy_matters

There is an entire genre of YouTube videos devoted to an experience which I am certain that everyone in this room has had. It entails an individual who, thinking they're alone, engages in some expressive behavior — wild singing, gyrating dancing, some mild sexual activity — only to discover that, in fact, they are not alone, that there is a person watching and lurking, the discovery of which causes them to immediately cease what they were doing in horror. The sense of shame and humiliation in their face is palpable. It's the sense of, "This is something I'm willing to do only if no one else is watching."

This is the crux of the work on which I have been singularly focused for the last 16 months, the question of why privacy matters, a question that has arisen in the context of a global debate, enabled by the revelations of Edward Snowden that the United States and its partners, unbeknownst to the entire world, has converted the Internet, once heralded as an unprecedented tool of liberation and democratization, into an unprecedented zone of mass, indiscriminate surveillance.

There is a very common sentiment that arises in this debate, even among people who are uncomfortable with mass surveillance, which says that there is no real harm that comes from this large-scale invasion because only people who are engaged in bad acts have a reason to want to hide and to care about their privacy. This worldview is implicitly grounded in the proposition that there are two kinds of people in the world, good people and bad people. Bad people are those who plot terrorist attacks or who engage in violent criminality and therefore have reasons to want to hide what they're doing, have reasons to care about their privacy. But by contrast, good people are people who go to work, come home, raise their children, watch television. They use the Internet not to plot bombing attacks but to read the news or exchange recipes or to plan their kids' Little League games, and those people are doing nothing wrong and therefore have nothing to hide and no reason to fear the government monitoring them.

The people who are actually saying that are engaged in a very extreme act of self-deprecation. What they're really saying is, "I have agreed to make myself such a harmless and unthreatening and uninteresting person that I actually don't fear having the government know what it is that I'm doing." This mindset has found what I think is its purest expression in a 2009 interview with the longtime CEO of Google, Eric Schmidt, who, when asked about all the different ways his company is causing invasions of privacy for hundreds of millions of people around the world, said this: He said, "If you're doing something that you don't want other people to know, maybe you shouldn't be doing it in the first place."

Now, there's all kinds of things to say about that mentality, the first of which is that the people who say that, who say that privacy isn't really important, they don't actually believe it, and the way you know that they don't actually believe it is that while they say with their words that privacy doesn't matter, with their actions, they take all kinds of steps to safeguard their privacy. They put passwords on their email and their social media accounts, they put locks on their bedroom and bathroom doors, all steps designed to prevent other people from entering what they consider their private realm and knowing what it is that they don't want other people to know. The very same Eric Schmidt, the CEO of Google, ordered his employees at Google to cease speaking with the online Internet magazine CNET after CNET published an article full of personal, private information about Eric Schmidt, which it obtained exclusively through Google searches and using other Google products. (Laughter) This same division can be seen with the CEO of Facebook, Mark Zuckerberg, who in an infamous interview in 2010 pronounced that privacy is no longer a "social norm." Last year, Mark Zuckerberg and his new wife purchased not only their own house but also all four adjacent houses in Palo Alto for a total of 30 million dollars in order to ensure that they enjoyed a zone of privacy that prevented other people from monitoring what they do in their personal lives.

Over the last 16 months, as I've debated this issue around the world, every single time somebody has said to me, "I don't really worry about invasions of privacy because I don't have anything to hide." I always say the same thing to them. I get out a pen, I write down my email address. I say, "Here's my email address. What I want you to do when you get home is email me the passwords to all of your email accounts, not just the nice, respectable work one in your name, but all of them, because I want to be able to just troll through what it is you're doing online, read what I want to read and publish whatever I find interesting. After all, if you're not a bad person, if you're doing nothing wrong, you should have nothing to hide."

Not a single person has taken me up on that offer. I check and — (Applause) I check that email account religiously all the time. It's a very desolate place. And there's a reason for that, which is that we as human beings, even those of us who in words disclaim the importance of our own privacy, instinctively understand the profound importance of it. It is true that as human beings, we're social animals, which means we have a need for other people to know what we're doing and saying and thinking, which is why we voluntarily publish information about ourselves online. But equally essential to what it means to be a free and fulfilled human being is to have a place that we can go and be free of the judgmental eyes of other people. There's a reason why we seek that out, and our reason is that all of us — not just terrorists and criminals, all of us — have things to hide. There are all sorts of things that we do and think that we're willing to tell our physician or our lawyer or our psychologist or our spouse or our best friend that we would be mortified for the rest of the world to learn. We make judgments every single day about the kinds of things that we say and think and do that we're willing to have other people know, and the kinds of things that we say and think and do that we don't want anyone else to know about. People can very easily in words claim that they don't value their privacy, but their actions negate the authenticity of that belief.

Now, there's a reason why privacy is so craved universally and instinctively. It isn't just a reflexive movement like breathing air or drinking water. The reason is that when we're in a state where we can be monitored, where we can be watched, our behavior changes dramatically. The range of behavioral options that we consider when we think we're being watched severely reduce. This is just a fact of human nature that has been recognized in social science and in literature and in religion and in virtually every field of discipline. There are dozens of psychological studies that prove that when somebody knows that they might be watched, the behavior they engage in is vastly more conformist and compliant. Human shame is a very powerful motivator, as is the desire to avoid it, and that's the reason why people, when they're in a state of being watched, make decisions not that are the byproduct of their own agency but that are about the expectations that others have of them or the mandates of societal orthodoxy.

This realization was exploited most powerfully for pragmatic ends by the 18th- century philosopher Jeremy Bentham, who set out to resolve an important problem ushered in by the industrial age, where, for the first time, institutions had become so large and centralized that they were no longer able to monitor and therefore control each one of their individual members, and the solution that he devised was an architectural design originally intended to be implemented in prisons that he called the panopticon, the primary attribute of which was the construction of an enormous tower in the center of the institution where whoever controlled the institution could at any moment watch any of the inmates, although they couldn't watch all of them at all times. And crucial to this design was that the inmates could not actually see into the panopticon, into the tower, and so they never knew if they were being watched or even when. And what made him so excited about this discovery was that that would mean that the prisoners would have to assume that they were being watched at any given moment, which would be the ultimate enforcer for obedience and compliance. The 20th-century French philosopher Michel Foucault realized that that model could be used not just for prisons but for every institution that seeks to control human behavior: schools, hospitals, factories, workplaces. And what he said was that this mindset, this framework discovered by Bentham, was the key means of societal control for modern, Western societies, which no longer need the overt weapons of tyranny — punishing or imprisoning or killing dissidents, or legally compelling loyalty to a particular party — because mass surveillance creates a prison in the mind that is a much more subtle though much more effective means of fostering compliance with social norms or with social orthodoxy, much more effective than brute force could ever be.

The most iconic work of literature about surveillance and privacy is the George Orwell novel "1984," which we all learn in school, and therefore it's almost become a cliche. In fact, whenever you bring it up in a debate about surveillance, people instantaneously dismiss it as inapplicable, and what they say is, "Oh, well in '1984,' there were monitors in people's homes, they were being watched at every given moment, and that has nothing to do with the surveillance state that we face." That is an actual fundamental misapprehension of the warnings that Orwell issued in "1984." The warning that he was issuing was about a surveillance state not that monitored everybody at all times, but where people were aware that they could be monitored at any given moment. Here is how Orwell's narrator, Winston Smith, described the surveillance system that they faced: "There was, of course, no way of knowing whether you were being watched at any given moment." He went on to say, "At any rate, they could plug in your wire whenever they wanted to. You had to live, did live, from habit that became instinct, in the assumption that every sound you made was overheard and except in darkness every movement scrutinized."

The Abrahamic religions similarly posit that there's an invisible, all-knowing authority who, because of its omniscience, always watches whatever you're doing, which means you never have a private moment, the ultimate enforcer for obedience to its dictates.

What all of these seemingly disparate works recognize, the conclusion that they all reach, is that a society in which people can be monitored at all times is a society that breeds conformity and obedience and submission, which is why every tyrant, the most overt to the most subtle, craves that system. Conversely, even more importantly, it is a realm of privacy, the ability to go somewhere where we can think and reason and interact and speak without the judgmental eyes of others being cast upon us, in which creativity and exploration and dissent exclusively reside, and that is the reason why, when we allow a society to exist in which we're subject to constant monitoring, we allow the essence of human freedom to be severely crippled.

The last point I want to observe about this mindset, the idea that only people who are doing something wrong have things to hide and therefore reasons to care about privacy, is that it entrenches two very destructive messages, two destructive lessons, the first of which is that the only people who care about privacy, the only people who will seek out privacy, are by definition bad people. This is a conclusion that we should have all kinds of reasons for avoiding, the most important of which is that when you say, "somebody who is doing bad things," you probably mean things like plotting a terrorist attack or engaging in violent criminality, a much narrower conception of what people who wield power mean when they say, "doing bad things." For them, "doing bad things" typically means doing something that poses meaningful challenges to the exercise of our own power.

The other really destructive and, I think, even more insidious lesson that comes from accepting this mindset is there's an implicit bargain that people who accept this mindset have accepted, and that bargain is this: If you're willing to render yourself sufficiently harmless, sufficiently unthreatening to those who wield political power, then and only then can you be free of the dangers of surveillance. It's only those who are dissidents, who challenge power, who have something to worry about. There are all kinds of reasons why we should want to avoid that lesson as well. You may be a person who, right now, doesn't want to engage in that behavior, but at some point in the future you might. Even if you're somebody who decides that you never want to, the fact that there are other people who are willing to and able to resist and be adversarial to those in power — dissidents and journalists and activists and a whole range of others — is something that brings us all collective good that we should want to preserve. Equally critical is that the measure of how free a society is is not how it treats its good, obedient, compliant citizens, but how it treats its dissidents and those who resist orthodoxy. But the most important reason is that a system of mass surveillance suppresses our own freedom in all sorts of ways. It renders off-limits all kinds of behavioral choices without our even knowing that it's happened. The renowned socialist activist Rosa Luxemburg once said, "He who does not move does not notice his chains." We can try and render the chains of mass surveillance invisible or undetectable, but the constraints that it imposes on us do not become any less potent.

Bruno Giussani: Glenn, thank you. The case is rather convincing, I have to say, but I want to bring you back to the last 16 months and to Edward Snowden for a few questions, if you don't mind. The first one is personal to you. We have all read about the arrest of your partner, David Miranda in London, and other difficulties, but I assume that in terms of personal engagement and risk, that the pressure on you is not that easy to take on the biggest sovereign organizations in the world. Tell us a little bit about that.

Glenn Greenwald: You know, I think one of the things that happens is that people's courage in this regard gets contagious, and so although I and the other journalists with whom I was working were certainly aware of the risk — the United States continues to be the most powerful country in the world and doesn't appreciate it when you disclose thousands of their secrets on the Internet at will — seeing somebody who is a 29-year-old ordinary person who grew up in a very ordinary environment exercise the degree of principled courage that Edward Snowden risked, knowing that he was going to go to prison for the rest of his life or that his life would unravel, inspired me and inspired other journalists and inspired, I think, people around the world, including future whistleblowers, to realize that they can engage in that kind of behavior as well.

BG: I'm curious about your relationship with Ed Snowden, because you have spoken with him a lot, and you certainly continue doing so, but in your book, you never call him Edward, nor Ed, you say "Snowden." How come?

GG: You know, I'm sure that's something for a team of psychologists to examine. (Laughter) I don't really know. The reason I think that, one of the important objectives that he actually had, one of his, I think, most important tactics, was that he knew that one of the ways to distract attention from the substance of the revelations would be to try and personalize the focus on him, and for that reason, he stayed out of the media. He tried not to ever have his personal life subject to examination, and so I think calling him Snowden is a way of just identifying him as this important historical actor rather than trying to personalize him in a way that might distract attention from the substance.

Moderator: So his revelations, your analysis, the work of other journalists, have really developed the debate, and many governments, for example, have reacted, including in Brazil, with projects and programs to reshape a little bit the design of the Internet, etc. There are a lot of things going on in that sense. But I'm wondering, for you personally, what is the endgame? At what point will you think, well, actually, we've succeeded in moving the dial?

GG: Well, I mean, the endgame for me as a journalist is very simple, which is to make sure that every single document that's newsworthy and that ought to be disclosed ends up being disclosed, and that secrets that should never have been kept in the first place end up uncovered. To me, that's the essence of journalism and that's what I'm committed to doing. As somebody who finds mass surveillance odious for all the reasons I just talked about and a lot more, I mean, I look at this as work that will never end until governments around the world are no longer able to subject entire populations to monitoring and surveillance unless they convince some court or some entity that the person they've targeted has actually done something wrong. To me, that's the way that privacy can be rejuvenated.

BG: So Snowden is very, as we've seen at TED, is very articulate in presenting and portraying himself as a defender of democratic values and democratic principles. But then, many people really find it difficult to believe that those are his only motivations. They find it difficult to believe that there was no money involved, that he didn't sell some of those secrets, even to China and to Russia, which are clearly not the best friends of the United States right now. And I'm sure many people in the room are wondering the same question. Do you consider it possible there is that part of Snowden we've not seen yet?

GG: No, I consider that absurd and idiotic. (Laughter) If you wanted to, and I know you're just playing devil's advocate, but if you wanted to sell secrets to another country, which he could have done and become extremely rich doing so, the last thing you would do is take those secrets and give them to journalists and ask journalists to publish them, because it makes those secrets worthless. People who want to enrich themselves do it secretly by selling secrets to the government, but I think there's one important point worth making, which is, that accusation comes from people in the U.S. government, from people in the media who are loyalists to these various governments, and I think a lot of times when people make accusations like that about other people — "Oh, he can't really be doing this for principled reasons, he must have some corrupt, nefarious reason" — they're saying a lot more about themselves than they are the target of their accusations, because — (Applause) — those people, the ones who make that accusation, they themselves never act for any reason other than corrupt reasons, so they assume that everybody else is plagued by the same disease of soullessness as they are, and so that's the assumption. (Applause)

BG: Glenn, thank you very much. GG: Thank you very much.

BG: Glenn Greenwald. (Applause)

https://www.ted.com/talks/glenn_greenwald_why_privacy_matters/transcript

What is The Bench in Tech?

What is The Bench in Tech?

rwx.gg

[What is The Bench in Tech?](https://duckduckgo.com/?kae=t&q=What is The Bench in Tech?)

At the Game, But Not Playing

The bench in the tech industry is a colloquial term for being employed or on a team but not being called on to really do anything. Sometimes you can actually put yourself on the bench without even knowing it. One thing is for sure, the only way you get off the bench is by getting laid off or getting engaged again. Often you need to get yourself off the bench.

See Also

Š 2020 Rob Muhlestein. Licensed under Creative Commons Attribution-ShareAlike.
Does something seem to have changed? Check the change log.
See something wrong? Open a ticket.
https://rwx.gg/what/bench/

remote access - termux wiki

Remote Access - Termux Wiki

Navigation menu

Toggle navigation Termux Wiki

Remote Access

From Termux Wiki

Jump to: navigation, search

Termux is capable of accessing remote devices by using some common tools. It is also possible to turn a device running Termux into remote controlled server.

FTP

Warning: plain FTP is deprecated and insecure anyway. Termux FTP server supports only anonymous login, there no any authentication and everyone on your network can access files on your device. Use SFTP (OpenSSH) instead!

Termux FTP server is based on busybox and service is managed by [Termux-services]. If you decided to use FTP server, install these packages:

pkg install busybox termux-services

After installation you need to restart session or source this file:

source $PREFIX/etc/profile.d/start-services.sh

Now you ready to enable and start the FTP daemon service:

sv-enable ftpd
sv up ftpd

FTP server will run on port 8021 in read-only mode.

If you need to stop server, run sv down ftpd.

SSH

SSH provides a secure way for accessing remote hosts and replaces tools such as telnet, rlogin, rsh, ftp. Termux provides SSH via two packages: dropbear and openssh. If you never used these tools before, it is recommended to install 'openssh' as it is more common.

Using the SSH client

You can obtain an SSH client by installing either `openssh` or `dropbear`.

Usage example

To login to a remote machine where the ssh daemon is running at the standard port (22):

ssh user@hostname_or_ip

Same as above, but if the ssh daemon running on different port, e.g. 8022:

ssh -p 8022 user@hostname_or_ip

Using public key authentication with ssh running on the standard port and a private key stored in the file `id_rsa`:

ssh -i id_rsa user@hostname_or_ip

Note, that if `id_rsa` will be stored in ~/.ssh directory, you can omit specifying it in the command. But if you have multiple keys, it is necessary to pick a specific key with -i {path\_to_privkey}.

SSH Agent

Important note: this does not work for Dropbear.

If you wish to use an SSH agent to avoid entering passwords, the Termux openssh package provides a wrapper script named `ssha` (note the `a` at the end) for ssh, which:

  • Starts the ssh agent if necessary (or connect to it if already running).
  • Runs the `ssh-add` if necessary.
  • Runs the `ssh` with the provided arguments.

This means that the agent will prompt for a key password at first run, but remember the authorization for subsequent runs.

Using the SSH server

OpenSSH

OpenSSH (also known as OpenBSD Secure Shell) is a suite of secure networking utilities based on the Secure Shell (SSH) protocol, which provides a secure channel over an unsecured network in a client–server architecture.

Default SSH port in Termux is 8022.

Starting and stopping OpenSSH server

Since Termux does not use initialization system, services are started manually from command line.

To start OpenSSH server, you need to execute this command:

sshd

If you need to stop `sshd`, just kill it's process:

pkill sshd

SSH daemon does logging to Android system log, you can view it by running logcat -s 'sshd:*'. You can do that either from Termux or ADB.

Setting up password authentication

Password authentication is enabled by default. This will allow you to get started with it much easier. Before proceeding, make sure that you understand that password authentication is less secure than a pubkey-based one.

  1. Ensure that everything is up to date and package `openssh` is installed:

pkg upgrade
pkg install openssh

  1. Password authentication is enabled by default in configuration file. But you can still review it ($PREFIX/etc/ssh/sshd_config), it should be like this:

PrintMotd yes
PasswordAuthentication yes
Subsystem sftp /data/data/com.termux/files/usr/libexec/sftp-server

  1. Set new password. Execute command passwd. While program allows minimal password length is 1 character, the recommended password length is more than 8-10 characters. Passwords are not printed to console.

$ passwd
New password:
Retype new password:
New password was successfully set.

Setting up public key authentication

Public key authentication is the recommended way for logging in using SSH. To use this type of authentication, you need to have a public/private key pair. For successful login, the public key must exist in the authorized keys list on remote machine while private key should be kept safe on your local host.

In the following example it will be assumed that you want to establish public key authentication between your PC (host) and your Android device running Termux (remote). It also will be assumed that you running Linux distribution on your PC.

  1. If you do not have keys, you can generate them. In this example we will generate RSA key. On PC, execute this command:

ssh-keygen -t rsa -b 2048 -f id_rsa

The command shown above generates private RSA key with 2048 bit key length and saves it to file `id_rsa`. In the same directory you can find a file `id_rsa.pub` – it is a public key.

Important note: 2048 bit is the minimal key length that is considered safe. You can use higher values, but do not use higher than 4096 as remote server may not support big keys.

  1. Copy key to the remote machine (Termux). Password authentication has to be enabled in order to install pubkey on remote machine. Now do:

ssh-copy-id -p 8022 -i id_rsa IP_ADDRESS

Do not forget to replace `IP_ADDRESS` with the actual LAN IP address of your device. It can be determined by using command ifconfig.

If everything was okay, you will see a message like this one:

Number of key(s) added: 1

Now try logging into the machine, with: "ssh -p'8022''192.168.1.4'"
and check to make sure that only the key(s) you wanted were added.

  1. From this point password authentication can be disabled. Edit file $PREFIX/etc/ssh/sshd_config and replace line beginning with "PasswordAuthentication" by

PasswordAuthentication no

Then execute command pkill sshd; sshd in order to restart server with updated configuration file.

Dropbear

Dropbear is a software package written by Matt Johnston that provides a Secure Shell-compatible server and client. It is designed as a replacement for standard OpenSSH for environments with low memory and processor resources, such as embedded systems.

Important note: Dropbear does not provide SFTP server.

Starting and stopping Dropbear server

Same as for OpenSSH, you will need to execute it's binary manually. Also, unlike OpenSSH, Dropbear does not use a configuration file but only command line arguments.

Server is running in background, both password and public key authentication available. To achieve this, just type in console:

dropbear

If you need only public key authentication, do this instead:

dropbear -s

Also, server can be started in foreground. For this purpose use a parameter -F:

dropbear -F

Server started in foreground can be stopped by just Ctrl-C key combination. If it is in the background, then you can use a `pkill`:

pkill dropbear

Setting up password authentication

Same as for OpenSSH, password authentication is enabled by default.

Everything you have to do, is:

  1. Make sure that everything is up to date and dropbear is installed:

pkg upgrade
pkg install dropbear

  1. Set password by executing command passwd.

  2. Start dropbear server. You can execute either just dropbear to start it in background or dropbear -F to start it in the foreground.

Setting up public key authentication

Same as for OpenSSH, you can put your keys by using ssh-copy-id. But if you consider to setup a public key authentication from Termux to something else, it is worth to mention some important differences between OpenSSH and Dropbear.

  1. Dropbear uses a different command for generating keys. Example of generating RSA key (2048 bit):

dropbearkey -t rsa -f id_rsa -s 2048

  1. Public key should be obtained manually. To do this, you have to use 'dropbearkey' again, but in different way:

dropbearkey -f id_rsa -y

  1. Dropbear and OpenSSH uses a different key formats. To use a Dropbear's key in OpenSSH, you will have to convert it:

dropbearconvert dropbear openssh ./id_rsa ./id_rsa_openssh

This procedure can be done vice versa to obtain a key in Dropbear's format:

dropbearconvert openssh dropbear ./id_rsa_openssh ./id_rsa_dropbear

Using the SFTP

Package OpenSSH provides a tool for accessing remote hosts over SFTP. This will allow you to work with files in same way as via FTP but with better security.

Connecting to Termux (sshd listening on port 8022):

$ sftp -P 8022 192.168.1.20

Connecting to somewhere else (sshd listening on standard port):

$ sftp sftp.example.com

However, to use command line SFTP client you should know some basic commands:

  • cd PATH - change current directory to `PATH`.
  • get REMOTE [LOCAL] - download file `REMOTE` and rename it as `LOCAL` (optional).
  • mkdir PATH - create directory `PATH`.
  • ls [PATH] - list files in directory `PATH`. If no argument, files in current directory will be listed.
  • put LOCAL [REMOTE] - Upload file `LOCAL` and rename it as `REMOTE` (optional).
  • rm FILE - Delete file `FILE`.

This is not a complete list of SFTP commands. To view all available commands, consider to view man page (man sftp) or view short help in interactive SFTP session by issuing command `help`.

MOSH

Mosh is a remote terminal application that allows roaming, supports intermittent connectivity, and provides intelligent local echo and line editing of user keystrokes.

Usage example

Important note: Mosh should be installed on both client and server side.

Connecting to remote host (sshd listening on standard port):

mosh [email protected]

Connecting to Termux (sshd listening on port 8022):

mosh --ssh="ssh -p 8022" 192.168.1.25

Rsync

Rsync is a tool for synchronizing files with remote hosts or local directories (or drives). For better experience of using rsync, make sure that package `openssh` (or `dropbear`) is installed.

Usage example

Sync your photos with PC:

$ rsync -av /sdcard/DCIM/ [email protected]:~/Pictures/Android/

Get photos from remote Android device:

$ rsync -av -e 'ssh -p 8022' 192.168.1.3:/sdcard/DCIM/ /sdcard/DCIM/

Sync local directories (e.g. from external sdcard to Termux home):

$ rsync -av /storage/0123-4567/myfiles ~/files

You may want to see man page (`man rsync`) to learn more about it's usage.

See Also

Accessing Termux from the Internet

Connecting to Termux with SSH over USB

Retrieved from "https://wiki.termux.com/index.php?title=Remote_Access&oldid=5650"

Edit ‌

Contentsto top

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.