Silo Blog


  • Home

  • Archives

  • Tags

  • Search

Linux sftp、rlogin命令中执行一段脚本的方法

Posted on 2017-05-14 | In Linux |

Linux中使用rsh远程登陆或者sftp的时候,想要在登陆命令后面执行一段命令,可以使用下面的方式。

sftp

使用案例:

1
2
3
4
sftp user@servedr <<EOF
    ls
    put test.txt
EOF

rsh

1
rsh -l irteam $HOST "cd apps/apache-tomcat-7.0.78/bin; ./deploy.sh"
# Linux # sftp # rsh
JVM中对象的创建过程
office online server实现文档的预览编辑
  • Table of Contents
  • Overview
Ethen

Ethen

42 posts
14 categories
43 tags
RSS
  1. 1 sftp
  2. 2 rsh
© 2019 Ethen
Powered by Jekyll
Theme - NexT.Mist