2016-05-12 21 views
0

私はscpに見えない1台のマシンを持っていますが、私はSSHを使うことができます。私は2つの別々のマシンからscpingを試みました。私が手に基本的な出力は次のようになります。私はSCPに、いくつかのデバッグフラグを追加すると、私はいくつかのメッセージを失敗しますが、私は、彼らが何を意味するかわからないということ特定のマシンにscpできないのはなぜですか?

scp /tmp/file [email protected]:/tmp 

Password: 
IP Address: 

見ることができます:

Password: 
debug2: input_userauth_info_req 
debug2: input_userauth_info_req: num_prompts 0 
debug1: Authentication succeeded (keyboard-interactive). 
Authenticated to <IP> ([<IP>]:22). 
debug2: fd 4 setting O_NONBLOCK 
debug2: fd 5 setting O_NONBLOCK 
debug1: channel 0: new [client-session] 
debug2: channel 0: send open 
debug1: Requesting [email protected] 
debug1: Entering interactive session. 
debug2: callback start 
debug2: fd 3 setting TCP_NODELAY 
debug2: client_session2_setup: id 0 
debug1: Sending environment. 
debug1: Sending env LANG = en_US.UTF-8 
debug2: channel 0: request env confirm 0 
debug1: Sending command: scp -v -t /tmp 
debug2: channel 0: request exec confirm 1 
debug2: callback done 
debug2: channel 0: open confirm rwindow 0 rmax 32768 
debug2: channel 0: rcvd adjust 2097152 
debug2: channel_input_status_confirm: type 99 id 0 
debug2: exec request accepted on channel 0 
IP Address: 
debug2: channel 0: read<=0 rfd 4 len 0 
debug2: channel 0: read **failed** 
debug2: channel 0: close_read 
debug2: channel 0: input open -> drain 
debug2: channel 0: ibuf empty 
debug2: channel 0: send eof 
debug2: channel 0: input drain -> **closed** 
user:current_dir # debug2: channel 0: write **failed** 
debug2: channel 0: close_write 
debug2: channel 0: send eow 
debug2: channel 0: output open -> **closed** 
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0 
debug2: channel 0: rcvd eof 
debug2: channel 0: rcvd close 
debug2: channel 0: almost dead 
debug2: channel 0: gc: notify user 
debug2: channel 0: gc: user detached 
debug2: channel 0: send close 
debug2: channel 0: is dead 
debug2: channel 0: garbage collecting 
debug1: channel 0: free: client-session, nchannels 1 
debug1: fd 0 clearing O_NONBLOCK 
debug1: fd 1 clearing O_NONBLOCK 
Transferred: sent 2660, received 2380 bytes, in 0.1 seconds 
Bytes per second: sent 40626.2, received 36349.8 
debug1: Exit status 0 

どれ情報大変感謝しています!

+0

'ssh -vvv dest @ IP'を使って得られるものは?シェルの '〜/ .bashrc'またはそれぞれのrcfileは何ですか? – Jakuje

+0

セキュアコピー(SCP)はRCPプロトコルを使用します。おそらくそのサーバーはRCPのようなものをブロックするように設定されていますか? SFTPがあなたの目的のために働くかどうか試すことができますか? – LukStorms

+0

あなたは '/ tmp'の代わりにあなたのホームディレクトリに書き込もうとしますか?' user:current_dir#debug2:channel 0:write ** failed ** ' – codedge

答えて

0

マシンの.bashrcがscpにしようとしていたからです.bashrcはecho varコマンドを持つエイリアスシェルスクリプトを調達していました。エコーを削除すると問題が解決しました。

0

SCPはSFTPプロトコルを使用していないが、必要これらはその全ての兆候が

0
Authenticated to <IP> ([<IP>]:22). 
... 
debug1: Entering interactive session. 
... 
debug2: exec request accepted on channel 0 
IP Address: 

(これは、受信ホストでシェルにscpコマンドを起動します)が存在し、受信機のaswellにインストールするscpがリモートシステムに対して正常に認証され、そこでセッションが開始されました。 「IPアドレス:」プロンプトは、セッション内でリモートシステム上で実行されているプログラムから来ている必要があります。

要するに、リモートシステムはログイン時に自動的に専用プログラムを起動します。これにより、プログラムでspecial steps to permit them to workを使用していない限り、sshで起動されたscpやその他のプログラムが機能しなくなります。

私の推測では、リモートシステムは「jump server」と設定されていると思います。接続したい別のコンピュータのIPアドレスを要求します。 IPアドレスを入力すると、そのシステムへのssh接続(またはリブートなど)が行われます。

プログラムの目的が何であっても、このプログラムの起動方法を知らなくても、その回避方法を言うことは不可能です。システムとの間でファイルをコピーする必要がある場合は、リモートシステムの管理者に連絡する必要があります。

関連する問題