如题,请大神支招~~~
child_process…
@reverland 需要ssh库的
@i5ting = =ssh库是啥意思
@reverland scp是基于ssh协议的,so。。。
@reverland 比如https://github.com/mscdex/ssh2
@i5ting child_process直接scp。。。
@reverland 不行的,不信你试试,哈哈
@i5ting 额。。。明天试试。。。
@i5ting 昨晚试了下这个库https://github.com/spmjs/node-scp2 成功了~
@reverland 昨晚试了下这个库https://github.com/spmjs/node-scp2 成功了~
直接用的用户名:密码@地址:路径
@yuanzhhh shipit就是这种原理
@i5ting 我这里可以
> fs.existsSync('/tmp/.zshrc'); false > var scp = exec('scp $HOME/.zshrc reverland@localhost:/tmp/'); undefined > fs.existsSync('/tmp/.zshrc'); true
@reverland 你这是依赖scp命令的,哈哈
@i5ting 嗯嗯,谢谢 :P
@i5ting 233就是这意思,还以为怎么回事。。。
CNode 社区为国内最专业的 Node.js 开源技术社区,致力于 Node.js 的技术研究。
child_process…
@reverland 需要ssh库的
@i5ting = =ssh库是啥意思
@reverland scp是基于ssh协议的,so。。。
@reverland 比如https://github.com/mscdex/ssh2
@i5ting child_process直接scp。。。
@reverland 不行的,不信你试试,哈哈
@i5ting 额。。。明天试试。。。
@i5ting 昨晚试了下这个库https://github.com/spmjs/node-scp2 成功了~
@reverland 昨晚试了下这个库https://github.com/spmjs/node-scp2 成功了~
直接用的用户名:密码@地址:路径
@yuanzhhh shipit就是这种原理
@i5ting 我这里可以
@reverland 你这是依赖scp命令的,哈哈
@i5ting 嗯嗯,谢谢 :P
@i5ting 233就是这意思,还以为怎么回事。。。