Linux and Cloud computing--the second phase of Linux Server SetupChapter III: SSH server erection (bottom) OpenSSH advanced650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M01/84/7E/wKioL1eR7ZHCKzJZAAddXjRcms0785.jpg-wh_500x0-wm_3 -wmp_4-s_1068003250.jpg "title=" 884345685159655994.jpg "alt=" Wkiol1er7zhckzjzaaddxjrcms0785.jpg-wh_50 "/>5.sftp+chrootConfiguration SFTP only + Chroot.Give Some users limi
Original Couldn't read packet: Connection reset by peer troubleshooting (recommended), couldnpacket
As an O M engineer, not how much you know is your value, but how many mistakes you encounter are your greatest value.
You know, you have me, you have a lot, you have a lot of mistakes, I have you, it's my value.
I have encountered a very difficult error, so I 'd like to share it with you.
The following example shows how to use the root permission on a simulator to avoid permission errors.
On Apri
Glossary
Local host: Run secuecrt to manage remote Linux or Unix machines (generally Windows)
Remote Host: the host managed by secuecrt (generally Linux or UNIX)1. Enable SFTP
2. Introduction to SFTP commands
Serial number
Command
Purpose
1
ASCII
Set transmission mode to ASCII
2
Binary
Set the transmission mode to binary
3
CD
Change the default dir
.
(Convert the public key in SSH2 compatible format to OpenSSH compatible format
Ssh-keygen-I-f identity. Pub>/root/. Ssh/authorized_keys2
)3. the OpenSSH software includes the following commands:
Sshd-Ssh server program
Sftp-Server-SFTP server program (a protocol similar to FTP but providing data encryption)
SCP-- Non-interactive sftp-Server Client, used to uplo
Python's sftp function implementation
Recently, the company needs to use SFTP for file transmission, try to use Python implementation, the main use of the module is Paramiko. The detailed documentation for this module can refer to the following URL:http://www.paramiko.org/ code as follows, Python novice, for reference only:
Main features: download files from specified
Noun Explanation:"FTP" FTP is the file Transfer Protocol (Files Transfer Protocol), first of all, it is a protocol, the two devices to provide a file transfer between the different operating systems will have different implementation methods, but as long as the standard of this protocol, you can transfer files on the Internet. At the same time it is also the name of the application, the end of the FTP service is called FTP Server, the other end of the network file upload or download is called th
Brief introductionSSH is a protocol, OpenSSH is one of the open source implementations, Paramiko is a library of Python, implements the SSHV2 protocol (the underlying uses cryptography).With Paramiko, we can use the SSH protocol to perform operations on remote servers directly in Python code, rather than using SSH commands to operate on remote servers.Because Paramiko belongs to a third-party library, you need to install it using the following commandPIP3 Install Paramiko Paramiko IntroductionT
Configuring users to log on to the switch via HTTP Web managedBecause ENSP can't emulate HTTP login, it's just a little bit simpler.The configuration tasks for the entire HTTP login method are as follows:1. Upload and Load Web page files: Before enabling the HTTP service feature, you need to make sure that the Web page file is already loaded on the switch.2. Configure the SSL policy and load the digital certificate: Perform this configuration task only if you need to reload the SSL certificate.3
-C ufile [emailprotected]:~/ufile-COption enables the compression feature of SSH, as man ssh you can see in the explanation section of the-C option, there is this sentence: "The compression algorithm is the same used by gzip". SSH and gzip Use the same compression algorithm, that is, the second method is almost the same as the third method, but the third method is simpler and more convenient, so it is recommended to use the third method to transfer data.The third method of transmitting IB_LOGFI
ChallengeResponseAuthentication to 'no '. usePAM yes ----------- enable pam module # Accept locale-related environment variables ------------ environment variable export LANG into LC_NUMERIC LC_TIME when there are too many LC_NAME LC_ADDRESS when too many LC_ALL then #printmotd yes ------- after login? display some default information # PrintLastL Og yes --------- display the information of the last logon # TCPKeepAlive yes ------- the ssh server will send the keepalive information to the clien
SecureCRT: Use SecureCRT to upload and download data.Today, I learned that SecureCRT can use the zmodem protocol in linux to quickly transfer files, and it is also very convenient to use. I am also dumb to find other software to sftp, stupid :(You only need to set the default directory for upload and download.Options --> session options --> you can set the upload and download directories under file transfer.For the rest, you only need to log on to the
Today I will share with you about the Phpstorm editor, the main content of the introduction is Phpstorm how to implement the function of editing server code, the need for friends can refer to.
Phpstorm is a powerful, large-size farm favorite editor, is also my most commonly used editor. Here is a lazy feature to describe. The SFTP protocol is used to connect with the remote server, and the function of directly editing the server code is realized. The
first, directly create
1. Create a user
Useradd test2
2. Set User password
passwd test2
3, modify the login file directory and only allow access to a directory
modifying/etc/ssh/sshd_config files
#Subsystem sftp /usr/libexec/openssh/sftp-server
#这行指定使用sftp服务使用系统自带的internal-sftp
Subsystem
"Problem phenomenon": After installing the LFTP through RPM, the execution lftp huangmr:huangmr@192.168.107.132 cannot connect (lftp huangmr@192.168.107.132:~> ls
' ls ' at 0 [delaying before reconnect:175] or has been in the connecting ... ), via SFTP huangmr@192.168.107.132 but can be connected. "Problem reason": 192.168.107.132 FTP Service exception (should not start the FTP service), using the above command without port default 21 port (FTP protoc
file specified by the SSH configuration on the server to be trusted.
Tip: although the same private key/public key can be used to log on to different servers repeatedly, the private key/public key must be generated separately for different servers based on security considerations.
Personally, using SSH to log on to the server in Windows involves two types of special software: PuTTY and FileZilla.
If you want to use FileZilla's sftp to log on to the
Document directory
Use of pscp
Let's take a look at psftp.
Other optional sftp clients
With the popularization of Linux applications on servers, Linux system management is increasingly dependent on remote management. Putty is one of the excellent remote logon tools.
Putty is a free telnet, rlogin, and SSH client on Windows 32, but its functions are not inferior to commercial Telnet tools. It is very easy to use to remotely manage Linux. Its ma
= line. split (',') [2] auth_method = line. split (',') [3] if auth_method = 'Password': try: passwd = line. split (',') [4] t = paramiko. transport (host, port) t. connect (username = user, password = passwd) sftp = par Amiko. SFTPClient. from_transport (t) sftp. put (lfile, rfile) print "\ 033 [32 m I put % s to % s now, please waite a moment ..... \ 033 [0m \ n "% (lfile, host) print
lines to enable the negative mode:
Pasv_enable = YesPasv_min_port = 40000Pasvanderbilt max_port = 40100
Step 4> run the following command to restart the vsftpd service:
Bkjia @ bkjia :~ $ Sudo service vsftpd restart
Step 5> now the ftp server is listening for port 21. Run the following command to create a user. Use the/usr/sbin/nologin script to prevent ftp users from accessing the bash script.
Bkjia @ bkjia :~ $ Sudo useradd-m john-s/usr/sbin/nologinBkjia @ bkjia :~ $ Sudo passwd john
Step 6>
This is a creation in
Article, where the information may have evolved or changed.
OverviewOne previous article describes how to use Golang to execute remote commands via the SSH protocol: Golang execute remote command Similarly, the SSH protocol can also use Golang to remotely transfer files.In addition to the SSH library, in order to transfer files, you also need to use the GITHUB.COM/PKG/
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.