Linux ssh and Dropbear

Source: Internet
Author: User

Telnet: Telnet protocol

Using C/S architecture, clear text is used throughout.

The application layer protocol, which works on TCP 23 ports.

S:telnet Server

C:telnet Client



Ssh:secure Shell

The application layer protocol, which works on TPC 22 Port.

Both the communication process and the authentication process are encrypted, based on the host authentication.

User authentication process Encryption

Data transfer Process Encryption



Host key Hostkey:

Asymmetric encryption

Secert Key

Public key


OpenSSH

Server side: sshd

Configuration file:/etc/ssh/sshd_config


Client: SSH

Configuration file:/etc/ssh/ssh_config


#ssh-keygen [OPTION] key generator

[OPTION]

-T TYPE Specifies the encryption method, commonly used for RSA|DSA

-F keyfile Specifies the private key file.

-P ' PASSWORD ' specifies the password for the encrypted private key, ' indicates a blank password.


The generated key is stored in:

/home/username/.ssh/id_rsa the generated private key

/home/username/.ssh/id_rsa.pub generated Public key


Note: The permissions for the. SSH folder can only be 700!


The generated public key is saved to the relevant file in the home directory of the remote host username and can only be appended and not overwritten:

/home/username/.ssh/authorized_keys

Or

/home/username/.ssh/authorized_keys2


The permissions for the file are 600!


For example:

#ssh-keygen-t RSA

#scp/root/.ssh/id_rsa.pub [Email protected]:/tmp

#ssh [email protected] ' cat/tmp/id_rsa.pub >>/home/hadoop/.ssh/authroized_keys '


Or

#ssh-keygen-t rsa-f. Ssh/id_rsa-p "

#ssh-copy-id-i [email protected]



#ssh-copy-id [OPTION] [[Email protected]]host transfer the public key to a remote server

[OPTION]

-I pubkeyfile specifying a public key file


For example:

#ssh-copy-id-i. Ssh/authorized_keys [Email protected]


#scp [OPTION] SRC DEST cross-Host secure Replication tool.

[OPTION]

-R recursion

-A All


Src

[Email protected]:D IR

Localdir


DEST

[Email protected]:D IR

Localdir


For example:

#scp/root/busybox.tar.gz [Email protected]:/home/hadoop/


#scp [Email protected]:/home/hadoop/busybox.tar.gz/root/



#ssh [OPTION] [[email protected]]host ' COMMAND '

[OPTION]

-L USERNAME HOST


To store files from the host key accepted by the server:

/home/username/.ssh/kown_hosts




Dropbear: Embedded system-specific SSH server and client Tools

Server side: Dropbear

Key Generation tool:

Dropbearkey


Client: Dbclient


Dropbear using Nsswitch for name resolution by default


Nsswitch Required Documents:

/etc/nsswitch.conf

/lib/libnss_file*

/usr/lib/libnss3.so

/usr/lib/libnss.file*



Dropbear or checks to see if the default shell is the security shell of the current system when the user logs on. The security shell is defined within the/etc/shells.



Host key default location:

/etc/dropbear/

Dorpbear_rsa_host_key

Variable length, is a multiple of 8, the default is 1024

Dorpbear_dss_host_key

Fixed length, default is 1024


#dropbearkey [OPTION]

-T TYPE RSA|DSA

-F KeyFile

-S SIZE


This article is from "Small Private blog" blog, please be sure to keep this source http://ggvylf.blog.51cto.com/784661/1616796

Linux ssh and Dropbear

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.