서버에 연결한 후 Pscp가 정지됨 - cmd를 통해 Windows에서 Linux로 파일 복사

서버에 연결한 후 Pscp가 정지됨 - cmd를 통해 Windows에서 Linux로 파일 복사

나는 둘 다 시도하고있다프로그램 실행그리고프로그램 실행단일 파일 복사를 위한 명령줄윈도우 7기계가 도착해요리눅스(뎁)그런데 아래와 같은 오류가 발생했습니다.

퍼티 오류

pscp.exe -2 -v -sftp -pw password putty.chm [email protected]:/base/data/backup/

Looking up host "10.99.180.1"
Connecting to 10.99.180.1 port 22
We claim version: SSH-2.0-PuTTY_Release_0.67
Server version: SSH-2.0-OpenSSH_6.7
Using SSH protocol version 2
Doing Diffie-Hellman group exchange
Doing Diffie-Hellman key exchange with hash SHA-256
Host key fingerprint is:
ssh-rsa 2048 72:6c:f4:f6:e2:cb:bf:c2:89:e4:c5:8b:12:a3:e4:52
Initialised AES-256 SDCTR client->server encryption
Initialised HMAC-SHA-256 client->server MAC algorithm
Initialised AES-256 SDCTR server->client encryption
Initialised HMAC-SHA-256 server->client MAC algorithm
Using username "admin".
Attempting keyboard-interactive authentication
Server refused keyboard-interactive authentication
Sent password
Access granted
Opening session as main channel
Opened main channel
Started a shell/command
Using SFTP
Connected to 10.99.180.1
Server sent command exit status 0
Fatal: Received unexpected end-of-file from server

퍼티 동결

pscp.exe -2 -v -sftp -pw password putty.chm [email protected]:/base/data/backup
Looking up host "10.99.180.1"
Connecting to 10.99.180.1 port 22
We claim version: SSH-2.0-PuTTY_Release_0.67
Server version: SSH-2.0-OpenSSH_6.7
Using SSH protocol version 2
Doing Diffie-Hellman group exchange
Doing Diffie-Hellman key exchange with hash SHA-256
Host key fingerprint is:
ssh-rsa 2048 72:6c:f4:f6:e2:cb:bf:c2:89:e4:c5:8b:12:a3:e4:52
Initialised AES-256 SDCTR client->server encryption
Initialised HMAC-SHA-256 client->server MAC algorithm
Initialised AES-256 SDCTR server->client encryption
Initialised HMAC-SHA-256 server->client MAC algorithm
Using username "admin".
Attempting keyboard-interactive authentication
Server refused keyboard-interactive authentication
Sent password
Access granted
Opening session as main channel
Opened main channel
Started a shell/command
Using SFTP
Connected to 10.99.180.1

그런 다음 Ctrl+C를 눌러 고정 상태를 종료합니다.

WinSCP 오류

WinSCP.com /command "option confirm off" "open admin:[email protected]" "put test.txt /base/data/backup/" "exit"
confirm off
Searching for host...
Connecting to host...
Authenticating...
Using username "admin".
Authenticating with pre-entered password.
Authenticated.
Starting the session...
Received too large (825372730 B) SFTP packet. Max supported packet size is 10240
00 B.
The error is typically caused by message printed from startup script (like .prof
ile). The message may start with "120:".
Cannot initialize SFTP protocol. Is the host running an SFTP server?

답변1

여러 번 시도한 끝에 다음과 같은 답을 얻었습니다.

winscp.com /command "open scp://uname:[email protected]" "put C:\Users\%username%\Desktop\%filename-case% /var/shared/data/dump/" "exit"

전체 배치 스크립트는 다음과 같습니다.

@echo off
cd\
color 0a
cls
title Copying File to Dump
set /p filename-case=Enter the name of the directory:
cls
cd C:\Program Files (x86)\WinSCP
winscp.com /command "open scp://uname:[email protected]" "put C:\Users\%username%\Desktop\%filename-case% /var/shared/data/dump/" "exit"
msg * Directory %filename-case% Copied OK !!!
exit
exit

답변2

scp어쩌면 프로토콜을 사용해야 할까요 sftp?

pscp.exe -v -scp -pw password putty.chm [email protected]:/base/data/backup/

관련 정보