简体   繁体   English

使用Fabric在SSH隧道中的SCP文件

[英]SCP files in a SSH tunnel, Using Fabric

I've already did some release scripts with Fabric, but now the task is over my competencies. 我已经用Fabric做过一些发布脚本,但是现在任务已经超出了我的能力范围。

I need to transfert with SCP a tar ball from A to C using a ssh tunnel passing by B. 我需要使用一条通过B的ssh隧道,将SCP的柏油球从A转移到C。

I can test connections via SSH manually to see if A see B, and if B see C, and everything is fine. 我可以通过SSH手动测试连接,以查看A是否看到B,B是否看到C,一切都很好。

I've tried the stuff on this 2 link: 我已经尝试了以下2个链接上的内容:

https://gist.github.com/856179 https://gist.github.com/856179

https://gist.github.com/2760477 https://gist.github.com/2760477

But in one case, I'm never prompted to enter a password, so it's timing out, and the other one prompted for password, but timeout when I try a basic command like "uname". 但是在一种情况下,我从不提示输入密码,因此它正在超时,而另一种提示输入密码,但是在尝试诸如“ uname”之类的基本命令时却提示超时。

Does anyone already faced something like this ? 有人已经面对过这样的事情吗? Or have clues / hints ? 还是有线索/提示?

一种方法可能是将文件临时推送到B,然后将脚本发送到B,然后再将脚本推送到C?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM