Linux Learning Notes: 7 ssh command usage

  By remote control and management of multiple servers.

  Remote Tools: the Telnet, SSH, VNC

  ssh using ciphertext transmission, simple and safe. Secure Shell abbreviation SSH.

1. Basic Usage

  ssh 192.168.1.1 default the current user login

  ssh -l username 192.168.1.1 - Specifies the user name

  ssh [email protected] - Specifies the user name (the more common way)

2. Specify the port login

  SSH default port is 22

  ssh 192.168.1.1 -p 1234 - designated port

  Simply modify the / etc / ssh / ssh_config modify the following line: Port 22 - how to modify the port number?

A compression for all data requests

  ssh -C 192.168.1.1 - for the case where the compressed data encrypted using a relatively slow speed

4. Open the debug mode

  ssh -v [email protected] - trace debug SSH connection specific view of all aspects of

The binding source address

  ssh -b 192.168.1.2 [email protected] - assign an IP address as the source address of the establishment of a connection

6. remote command execution

  ssh [email protected] ls -l - command executed directly behind with

7. mount remote file systems

  SSH-based tool called sshfs, it can be mounted directly to the remote host in the local file system

  格式:sshfs -o idmap=user user@hostname:/home/user ~/Remote

  Rei如: sshfs -o idmap = user [email protected]: / home / pi ~ / Pi


END 2019-07-29 15:41:07

Guess you like

Origin www.cnblogs.com/hider/p/11264228.html