Skip to content

Commit

Permalink
fix(v1.0): support file upload
Browse files Browse the repository at this point in the history
  • Loading branch information
cuisongliu committed Mar 5, 2020
1 parent 297053a commit 196c0df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# shell
# sshcmd

ssh:

shell --user cuisongliu --passwd admin --host 127.0.0.1 --cmd "ls -l"
sshcmd --user cuisongliu --passwd admin --host 127.0.0.1 --cmd "ls -l"

scp:

shell --user cuisongliu --passwd admin --host 127.0.0.1 --mode "scp" --local-path "/aa.txt" --remote-path "/aa.txt"
sshcmd --user cuisongliu --passwd admin --host 127.0.0.1 --mode "scp" --local-path "/aa.txt" --remote-path "/aa.txt"

mod:
ssh,scp,ssh|scp,scp|ssh
Expand Down
1 change: 1 addition & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ func init() {
rootCmd.Flags().StringVar(&install.Passwd, "passwd", "", "password for ssh")
rootCmd.Flags().StringVar(&install.PrivateKeyFile, "pk", "/root/.ssh/id_rsa", "private key for ssh")
rootCmd.Flags().StringSliceVar(&host, "host", []string{}, "exec host")
rootCmd.Flags().StringVar(&command, "cmd", "", "exec shell")
rootCmd.Flags().StringVar(&localFilePath, "local-path", "", "local path , ex /etc/local.txt")
rootCmd.Flags().StringVar(&remoteFilePath, "remote-path", "", "local path , ex /etc/local.txt")
rootCmd.Flags().StringVar(&mode, "mode", "ssh", "mode type ,use | spilt . ex ssh scp ssh|scp scp|ssh")
Expand Down

0 comments on commit 196c0df

Please sign in to comment.