Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Username:Password config in readme.md not clear #144

Open
mayankasthana opened this issue Jul 10, 2015 · 2 comments
Open

Username:Password config in readme.md not clear #144

mayankasthana opened this issue Jul 10, 2015 · 2 comments

Comments

@mayankasthana
Copy link

It took me a while to understand that "hello" and "world" are the http basic auth username and passwords.

{
  "users": {
    "hello": "world"
  },
...

I also got confused as to what "users" was supposed to mean. At first I thought it wanted my linux username and password, so maybe it could open the terminal as that linux user. It is not apparent it is asking it for HTTP Basic Auth.

@thatkookooguy
Copy link

Basically, the "users" attribute in the config.json defines different logins to tty.js itself (some form of basic auth).
If you set up the files as in the example you used, if you'll go to your localhost:8080, tty.js will ask for a username and a password. It won't allow you to use a terminal otherwise.

It's also recommended that you sha1 your username and password. So instead of doing:

"users": {
  "hello": "world"
}

it is recommended to do:

"users": {
  "hashedUsernameHello": "hasedPasswordWorld"
}

On ubuntu, you can use the following function to hash1 your user and pass:

function sha1()
{
echo -n $1 | sha1sum | awk '{print $1}'
}

add it to your .bashrc file or just replace the first $1 with your username or password to sha1 them.

It doesn't pass the username to the terminal itself to my understanding.

@MaxPleaner
Copy link

#157 pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants