Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- scp yourfile serverb:
- ssh serverb sudo mv yourfile /path/to/the/destination
- ssh serverb sudo mkdir tempdir && sudo chmod 777 tempdir
- scp yourfile serverb:tempdir
- ssh serverb mv tempdir/yourfile /path/to/the/destination
- rsync --rsync-path="sudo rsync" <LOCALFILE> USER@SERVER2:/root
- ssh -t host 'sudo -v'
- ssh -C host 'cd /; sudo tar cf - path/to/file/or/dir' | tar xpsf - --preserve
- sftp -s 'sudo -u REMOTE_SUDO_USER /usr/libexec/openssh/sftp-server' REMOTE_USER@HOST
- current server $ sudo scp username@server:source/path/filename /tmp/
- echo "Enter password: "; read -s password; echo $password > password_file
- cat password_file source_file | ssh remote_host 'sudo -S sponge target_file'
- ssh user@serverB
- user@serverB: sudo scp user@remote:/path/file /path/tofileonB
Add Comment
Please, Sign In to add comment