Start to study the automatic upload script in Linux.
UPDATE: 2014.3.10. It has been verified. It is best to use the key ,.
Only one vomit blood can be highlighted {
The ftp port is blocked, and ftp is not necessarily installed on the linux server.
There are a large number of servers, and they can only be uploaded from the server to the log server (the
part is the command, how to execute the command at ordinary times, how to write this place
Two: sftp upload the downloaded shell script
The complete sftp upload script is as follows:
#!/bin/bash#SFTP配置信息#IPip=1.1.1.1#端口Port=22#用户名User=username#密码Password=password#待上传文件根目录Cl
The most common ssh while SSH service is provided by SSHD when remotely landing on a Linux server, and sshd also provides SFTP functionality.
Here the user sftp-admin, only can sftp connect the server and cannot ssh to connect the server.
SFTP Connection: OKSSH Connection:
Build sftp with openssh in linux (including note) and opensshsftp
To build sftp, three parts are required: zlib (including zlib, zlib-devel), openssl, and openssh. The required rpm packages are available in csdn.
1. openssl is installed in general linux systems, including rehat and centos.
Detection: which openssl
For
key pairing is complete5. Client Server TestingUse SFTP [email protected] login do not need to enter a password to indicate successTEST-LVM:~/.SSH # SFTP [email protected]Connecting to 172.22.2.228 ...Sftp> lsDownload uploadSftp>Failed to switch directories, only in the user root directorySftp> Cd/homeCouldn ' t canonicalise:no such file or directorySftp>6. Poin
; The SFTP was built successfully.
Use the system's own internal-sftp to build an SFTP server in the CentOS 6.6 environment.Open the Command Terminal window and follow the steps below.0. View OpenSSH versionSsh-vUse the SSH-V command to view the version of OpenSSH, the version must be greater than 4.8P1, and the version below will need to be upgraded.1. Create a
Tags: forward check chm error:machine localhost clear dir directory1,SFTP: Login Commandxshell:\> sftp [email protected]Connecting to 192.168.159.128:22 ...Connection established.To escape to local shell, press ' ctrl+alt+] '.Your current Local Directory isC:\Program Files\netsarang\xshell 42,help commandSftp:/root> HelpBye finish your SFTP sessionCD change your
/sftp/--After modifying the SFTP directory permissions, switch to the SFTP directory again sftp> LSSFTPG T Llstest1.txt test2.txt test3.txtsftp> put test*-this time put succeeds. So with permission related uploading test1.txt to/home/sftp/test1.txt 100% 4 bytes 4 bytes/s 00:
allowtcpforwarding no Forcecommand Internal-sftp-l info-f AUTH All users in the user group SFTP can use the SFTP service, after connecting with the SFTP service, you can access the directory as/data/sftp/username for an example: Test is a user of an
Linux Centos 6.6 Build SFTP ServerUse the system's own internal-sftp to build an SFTP server in the CentOS 6.6 environment.Open the Command Terminal window and follow the steps below.0. View OpenSSH version[Plain] view plaincopy
Ssh-v
Use the SSH-V command to view the version of OpenSSH, the version must
How to use sftp to upload or download files and folders in LinuxSFTP (Secure file transfer program) is a secure, interactive file transfer program that works in a similar way to FTP (File Transfer Protocol). However, SFTP is more secure than FTP, and it handles all operations by encrypting the SSH transport. In this article, we'll show you how to use SFTP to uplo
Use the system's own internal-sftp to build an SFTP server in the CentOS 6.6 environment.Open the Command Terminal window and follow the steps below.0. View OpenSSH version[Plain]View PlainCopy
Ssh-v
Use the SSH-V command to view the version of OpenSSH, the version must be greater than 4.8P1, and the version below will need to be upgraded.1. Create an SFTP
Use the system's own internal-sftp to build an SFTP server in the CentOS 6.6 environment.Open the Command Terminal window and follow the steps below.0. View OpenSSH version
1
ssh-V
Use the SSH-V command to view the version of OpenSSH, the version must be greater than 4.8P1, and the version below will need to be upgraded.1. Create an SFTP
The company needs to establish an FTP to manage the client's file upload, in order to security we intend to adopt SFTP, and request each customer through Sshkey landing.Perhaps you will say: "SFTP do not need to configure Ah, there is ssh directly can be used." Yes, but we don't want users to be able to log on to our servers via SSH, we want each customer to manage their own files through
Setting up SFTP requires three parts: zlib (including Zlib,zlib-devel), OPENSSL,OPENSSH, required RPM package in CSDN1. General Linux systems, including Rehat,centos, have the basic installation of OpenSSLDetection: Which OpenSSLForced installation of Openssl-devel due to dependency issuesRPM-IVH--nodeps--force openssl-devel-0.9.8e-22.el5_8.4.x86_64.rpm2. Install zlib related package, this step operation ca
]: debug1:userauth-request for user root service ssh-connection
No solution, continue Google solution Https://www.linuxquestions.org/questions/linux-server-73/can ' t-get-sftp-logging-to-work-931609/ Receive inspiration, will/etc/ssh/sshd_config in the
subsystem Sftp/usr/libexec/openssh/sftp-serverTosubsystem
1. Create a new user and set a password
> Useradd suser
> passwd suser//Enter password
2. Set up sshd configuration file
> cd/etc/ssh/
> CP sshd_config sshd_config.back//Backup
> VI sshd_config
Note If the line does not comment it will error
#Subsystem Sftp/usr/libexec/openssh/sftp-server
subsystem SFTP INTERNAL-SFTP
We sometimes encounter the need to restrict a Linux user to add, modify, delete only in the specified directory, and only use SFTP to log on to the server, not SSH operation. These can be implemented by configuring the SFTP service.There are vsftpd and internal-sftp for the SFTP
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.