Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ SSH configuration under Linux     - Linux PXE unattended installation PXE-E32: TFTP OPen timeout the solution (Linux)

- Shell Scripting Basics (Linux)

- Linux IPTables anti-DDOS attack Shell Scripting (Linux)

- Binding unofficial Google Drive and Ubuntu 14.04 LTS (Linux)

- Analysis of potential problems through custom Orabbix monitoring Oracle (Database)

- Vi editor Introduction (Linux)

- Node.js simple interface server (Server)

- CentOS 7.0 Close firewall is enabled by default iptables firewall (Linux)

- Java foundation comb: Array (Programming)

- How to use Android Studio development / debugging Android source code (Linux)

- Java synchronization mechanism used in locking Thought (Programming)

- Ubuntu 10.10 install Oracle 10g graphic tutorials (Database)

- Construction LVM-based raw device Oracle10g Database on Oracle Linux 5.11 (Database)

- Ubuntu 14.04 / Linux Mint 17 How to install the MintMenu 5.5.2 menu (Linux)

- Android components series Activity (Programming)

- PostgreSQL 9.4.3 Installation and Configuration under CentOS 6.5 (Database)

- Java keyword final, static (Programming)

- Hazelcast integration with MongoDB (Database)

- Linux System Tutorial: Fix ImportError: No module named wxversion error (Linux)

- A new method for Linux hidden files (Linux)

  SSH configuration under Linux
  Add Date : 2018-11-21      
  SSH Secure Shell is the acronym developed by the IETF Network Working Group (Network Working Group); SSH is based on the application layer and the transport layer on the basis of security protocols.

SSH is more reliable, designed to provide security protocol for remote login session, and other network services. Often for data copy between remote login, and users.

SSH protocol can effectively prevent the use of remote management in the process of information disclosure. SSH was originally a program on UNIX systems, and later quickly spread to other platforms. SSH when used properly can make up for network vulnerabilities. SSH clients are available for multiple platforms. Almost all UNIX platforms - including HP-UX, Linux, AIX, Solaris, Digital UNIX, Irix, and other platforms, can run SSH.

Installation related tools

SSH Server installation:

sudo apt-get install openssh-server

SSH client installation:

sudo apt-get install openssh-client

The relationship of client and server: if, A machine B want to be a machine remote control, then, A need to install the SSH server machine, B machine to install SSH client.

If a problem occurs during use, it can restart the SSH server:

sudo service ssh restart

Use test

Use the command: ssh -l username hostip

ssh: Command

-l: option, is the letter "L", not the number "1"

username: The username Telnet

hostip: telnet ip address is

View is the ip remote login:

Remote login (here the user wencong (A machine) Telnet edu (B machine)), you can not sudo:

SSH inform the user that the host does not recognize, then type "yes", SSH will be relevant information, write "~ / .ssh / know_hosts", the access again, would not have the information. Then enter the password is completed, you can log on to the mainframe.

Then, prompted to enter the login password:

Landed successfully:

If you want Windows platform remote login Linux, this time, Windows will need to install xmanager packages.

xmanager a package. It contains xshell, xftp, xstart software.

xshell: it is a ssh, TELNET and RLOGIN terminal software under the Windows platform. It allows users to easily and securely access Unix / Linux hosts on the Windows platform.

xftp: it is applied to a Windows platform FTP and SFTP file transfer program. xftp safely between Unix / Linux and Windows platforms to transfer files.

xstart: Allow remote access server using a graphical interface, but less efficient, supports only gnome desktop.

Here, we use xshell software. For details, see: "Linux development environment to build and use - Ubuntu via xshell remote connection."

SSH configuration

When SSH is installed, there is no default user profile, we can be self-configured according to their own.

As the above example, we want the user login edu on, every time we had to knock "ssh -l edu".

Here are some methods to simplify this command.

Build config file at ~ / .ssh:

Write the following in config:

Later, at the command line, run "ssh edu" edu users can login on:

NOTE: config first line, if instead Host * test, command then becomes: ssh test. The name of the test required custom name, naming knock on the match on the line.

Of course, there are many more other options, such as ForwardAgent, Compression, ForwardX11 FallBackToRsh, etc., will not list them here.

With "scp" copy files and directories

SSH provides a number of commands and shell to login to the remote server. By default, it does not allow users to copy files, but still provide a "scp" command, use the following method:

Copy the local file to the remote:

scp FileName RemoteUserName @ RemoteHostIp: RemoteFile

scp FileName RemoteHostIp: RemoteFolder

scp FileName RemoteHostIp: RemoteFile

The local directory to a remote:

scp -r FolderName RemoteUserName @ RemoteHostIp: RemoteFolder

scp -r FolderName RemoteHostIp: RemoteFolder

Copy remote files to your local:

scp RemoteUserName @ RemoteHostIp: RemoteFile FileName

scp RemoteHostIp: RemoteFolder FileName

scp RemoteHostIp: RemoteFile FileName

Remote directory to the local:

scp -r RemoteUserName @ RemoteHostIp: RemoteFolder FolderName

scp -r RemoteHostIp: RemoteFolder FolderName

Here only a test command, other operations are similar.

Copy remote files to your local:

scp RemoteUserName @ RemoteHostIp: RemoteFile FileName

RemoteUserName: remote user name

RemoteHostIp: remote ip

RemoteFile: remote file can be put on a path

FileName: name of the local copy to the post, you can take the path without path copy of the current directory

View remote directories and files:

Check local directory and files:

Remote file copy:

Copy remote files can be modified its name:

Copy remote file storage path can be specified
- Prevent security threats caused Rootkit (Linux)
- command-line tool for send e-mail (Linux)
- Slice MyCAT common fragmentation rules of enumeration (Database)
- CentOS7 install NTFS-3G driver (Linux)
- 5 steps to help you become a good Docker contributors (Linux)
- ActiveMQ5.10.2 version configuration JMX (Linux)
- High-performance JavaScript reflows and repaints (Programming)
- Linux environment SSH login password instead of using the RSA Certificate (Linux)
- Linux environment variable configuration and save places (Linux)
- MySQL master recovery from failure using binlog (Database)
- Build a super simple "hardware" firewall router (Linux)
- Oracle large table to clean truncate .. reuse storage (Database)
- How to use Quagga BGP (Border Gateway Protocol) router to filter BGP routing (Linux)
- shell script: MySQL monitoring service is normal (Database)
- Let Linux operating system more secure (Linux)
- Oracle for Oracle GoldenGate to achieve a one-way synchronization DDL operations (Database)
- Python 3 for instructions encoded string conversion (Programming)
- MySQL flip-flop (Database)
- A process of how to get the current traffic in GNU Linux (Linux)
- Oracle local user login authentication fails ORA-01031 insufficient privileges (Database)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.