ftp...返回本地 Kermit 并发出 RECEIVE 命令

ftp...返回本地 Kermit 并发出 RECEIVE 命令

我正在测试 ftp/kermit(尝试命令行来查看为什么它不能与脚本一起使用),并且由于某种原因我得到“返回到本地 Kermit 并给出 RECEIVE 命令”,但没有地方可以输入它就在那时……屏幕上出现了奇怪的字符。我不确定这指的是什么,并且在网上搜索也没有找到太多有用的信息。这就是我所看到的。我不太确定克米特的反馈。

$/apps/bin/kermit
C-Kermit>ftp open MMMM /USER:user\useruser /PASSWORD: pwpw   #changed for safety
Connected to MMMM.
User logged in.
Switching LOCUS  for file-management commands to REMOTE.
Remote system type is Windows_NT.
Default transfer mode is TEXT ("ASCII")
(/home/mcleary/k_test/michele/) C-Kermit>cd /home/mcleary/k_test/michele/
Switching LOCUS for file-management commands to LOCAL.
Service not available, connection closed by server
(/home/mcleary/k_test/michele/) C-Kermit>ascii
(/home/mcleary/k_test/michele/) C-Kermit>put test.txt ../20210916_test.txt
Return to your local Kermit and give a RECEIVE command.

KERMIT READY TO SEND...
 SENT: (0 files)

*************************
SEND-class command failed.
 Packets sent: 2
 Retransmissions: 11
 Timeouts: 12
 Damaged packets: 0
 Fatal Kermit Protocol Error: Too many retries

HINTS... If the preceding error message does not explain the failure:
 . Adjust the timeout method (see HELP SET SEND).
 . Increase the retry limit (see HELP SET RETRY).
 . Try it again with SET STREAMING OFF.
 . Try it again with SET PARITY SPACE.
 . As a last resort, give a ROBUST command and try again.
Also:
 . Be sure the source file has read permission.
 . Be sure the target directory has write permission.
(Use SET HINTS OFF to suppress hints.)
*************************

答案1

2 件事

(/home/mcleary/k_test/michele/) C-Kermit>cd /home/mcleary/k_test/michele/
Switching LOCUS for file-management commands to LOCAL.
Service not available, connection closed by server

远程系统是Windows NT,您确定要cd还是不要lcd?像这样的路径/home/..让我认为您想要本地更改目录(lcd在 kermit/ftp 中)而不是cd

kermit 曾经以两种方式工作

put/receive on remote kermit session
disconnect from remote
receive/put on local kermit session
wait for transfert
reconnect (`recon`) to remote

或者

tell remote to go server (on unix this was `kermit -s` )
disconnect
put/receive from local kermit session

你必须找到断开连接的钥匙(很可能是ctrl- /+,c正如罗艾玛指出的那样),这是什么man kermit意思?

答案2

这最终导致了文件的移动:

$/apps/bin/kermit
C-Kermit>ftp open MMMM /USER:user\useruser /PASSWORD: pwpw   #changed for safety
Connected to MMMM.
User logged in.
Default transfer mode is TEXT ("ASCII")
(/home/mcleary/k_test/michele/) C-Kermit>lcd /home/mcleary/k_test/michele/
(/home/mcleary/k_test/michele/) C-Kermit>ascii

(/home/mcleary/k_test/michele/) C-Kermit>pwd

(/home/mcleary/k_test/michele/) C-Kermit>cd destdir

(/home/mcleary/k_test/michele/) C-Kermit>put test.txt 20210916_test.txt
(/home/mcleary/k_test/michele/) C-Kermit>ls

我在目标目录中看到该文件。

我做错了两件事。我正在..重命名该test.txt文件,但没有获得许可。我还需要cd到达目标目录和lcd源目录。这移动了文件。

感谢大家!我觉得我现在已经掌握了将其转换的方法lftp

相关内容