Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Setting Wetty do not need an account login command line operations     - Linux security configuration (Linux)

- Git Tutorial Comments (Linux)

- C ++ function object (Programming)

- Two strokes to improve development productivity Struts2 (Programming)

- Linux Tutorial: Open multiple tabs in the GNOME terminal in Ubuntu 15.04 (Linux)

- Linux set the maximum number of open files nofile and nr_open, file-max Description (Linux)

- numpy and SciPy installation under Python for scientific computing package (Linux)

- Ubuntu 14.04 Boot Repair (Linux)

- Ubuntu 14.04 Install WordPress on Nginx (Server)

- Linux, Apache Web site security settings (Linux)

- How do I switch from NetworkManager to systemd-network on Linux (Linux)

- Linux Security Raiders SSH tools SCP uses examples to explain in detail (Linux)

- Linux Command Tutorial: du command to view disk space (Linux)

- Debian 7.6 install Nvidia graphics driver (Linux)

- Talking about the shortcomings and deficiencies of the firewall (Linux)

- Ubuntu Eclipse configuration Gtk + 2.0 libraries (Linux)

- Depth Java Singleton (Programming)

- Elasticsearch 2.20 Beginners: aggregation (Server)

- MySQL Slave synchronization problem solving (Database)

- How to configure a development environment elegant Lua (Linux)

 
         
  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 http://127.0.0.1:3000 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 http://127.0.0.1:3000/ 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.
     
         
         
         
  More:      
 
- LVS + Keepalived the DR mode (Server)
- The basic method RHEL6 (CentOS6) used in the source package compiled RPM: Upgrade OpenSSH articles (Linux)
- Linux System Getting Started Tutorial: Linux file permissions brief description (Linux)
- Android Action Compendium (Programming)
- Manage SQL Server services login (start) account and password (Database)
- Use Pylint regulate your Python code (Programming)
- installation of Piwik under Ubuntu (Programming)
- List Leaves (Programming)
- ASM Disk Space Check (Database)
- Zabbix monitoring different versions of RAID installation and monitoring and MySQL master-slave monitor (Server)
- MySQL import large amounts of data (Database)
- Oracle create a temporary table space group (Database)
- Linux systems dmesg command processing failures and system information collected seven usage (Linux)
- The Java way to stop a thread of execution (Programming)
- OpenWRT environment to build (Linux)
- linux raid levels and concepts introduced (Linux)
- Netcat Example (Linux)
- Oracle conditional select statements and looping statements (Database)
- How to configure Ceph stored on CentOS 7.0 (Server)
- There is sort of a directed acyclic graph topology (Programming)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.