Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ Setting Wetty do not need an account login command line operations     - Default permissions Linux file and directory permissions and hide - umask, chattr, lsattr, SUID, SGID, SBIT, file (Linux)

- In-depth understanding of capture Node.js garbage collection and memory leaks (Programming)

- C ++ containers (Programming)

- Debian 8.1 (amd64) deployed Memcached (Server)

- Linux server startup and logon security settings (Linux)

- Ubuntu under VirtualBox virtual machine serial port settings (Linux)

- Linux system security reinforcement (Linux)

- Linux package manager - yum (Linux)

- Linux Network Programming - raw socket instance: MAC header message analysis (Programming)

- MySQL high availability cluster fragmentation of deployment uses Cobar (Database)

- MySQL Tutorial: Philosophical Reflections on the unauthenticated user (Database)

- Ubuntu How to mount iso file (Linux)

- Java collections series (Programming)

- How to Install Foreman under Ubuntu (Server)

- CentOS and RHEL installation under GAMIT10.6 (Linux)

- Oracle Migration partition table (Database)

- Linux kernel netpoll framework netconsole (Linux)

- Linux (SUSE) mount NTFS mobile hard practice (Linux)

- Oracle11g CRS-0184 Problem Solving (Database)

- Oracle to use full-text indexing (Database)

  Setting Wetty do not need an account login command line operations
  Add Date : 2016-04-21      
  An essay before we talk about how to install a Linux deployment Wetty service, but we see, enter in the browser when visiting, we also need to enter the account password for authentication.

However, in some scenarios, we do not need to enter the account password to authenticate the user, and the user does not necessarily know the account password. We want our users to directly open command operations.

Input node app.js command line terminal will be the following tips, which lists all of the options described start wetty services.

These options see wetty by ssh for operation of the terminal, which is used to specify which --sshauth ssh authentication mode, the default password, represented by account password authentication method.

Ssh There are four kinds of authentication: hostbased, publickey, keyboard-interactive, password. That is where we said above password account password authentication; publickey is the RSA public key authentication; we do not care about the other two.

Wetty default password authentication is used, we can publickey authentication can be specified by --sshauth option. About ssh public key authentication mechanism are:

Users will own public key stored on the remote host. Login time, remote host sends a random string to the user, with its private key encryption, and then sent back. Remote host using the public key to decrypt stored in advance and, if successful, would prove that the user is authentic, allow direct login shell, no longer requires a password.

Then we need to open a command line terminal, enter

$ Ssh-keygen

To generate our public and private key.

This command generates a default public and private keys are stored in ~ / .ssh directory,

Wherein id_rsa file is saved in the private key, id_rsa.pub file is saved in the public key.

The above ssh public key authentication mechanism we need to talk about the public key to the remote machine to save, save after the login user's home directory ~ / .ssh / authorized_keys file. The public key is a string, as long as it is added at the end of the authorized_keys file on the line. At a time when our remote machine is the local machine, so we only need to ~ / .ssh / id_rsa.pub copy and named authorized_keys can.

$ Cp ~ / .ssh / id_rsa.pub ~ / .ssh / authorized_keys

Then we switch to the wetty directory, start wetty service,

$ Node app.js -p 3000 --sshauth = publickey

Then enter in your browser, you can see at this time do not need to enter the account password can be directly manipulated

If we suspect every boot option to also specify --sshauth too much trouble, we can directly modify app.js file in the source code. Open app.js file, we can see that it is specified in line 45 sshauth default authentication mode is password, we only need to modify it to publickey can.
- Introduction and MongoDB CRUD (Database)
- Iptables principle (Linux)
- Linux Network Programming --TCP and UDP datagram type Explanation (Programming)
- Vim custom color (Linux)
- 10 easy to use Linux utilities Recommended (Linux)
- Java rewrite the hashcode method (Programming)
- How to create a secure and easy to remember password (Linux)
- Several Methods of SSH Auto - login (Linux)
- 10 Nginx safety tips (Linux)
- Zabbix installation under Linux (Server)
- CentOS6 5 source compiler installation Hadoop2.5.1 (Server)
- Oracle: RETURNING clause (Database)
- Windows 7 hard disk installation notes Debian (Linux)
- Python maketrans () method (Programming)
- Summarize small problems encountered in the use Lua (Programming)
- Ubuntu how to install and use Objective-C (Linux)
- Oracle through the alarm log view and inspect the main library, physical and snapshot standby database (Database)
- Linux RAID Set RAID 10 or 0 + 1 (Linux)
- Understanding Java classes (Programming)
- How VMware extend disk without rebooting the system (Linux)
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.