Advertisement
Guest User

Untitled

a guest
Dec 6th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. // see if file exists on remote
  2. SSH::into($env)->exists( 'path/on/remote/filename.extension' );
  3.  
  4. // upload file to remote
  5. SSH::into($env)->put( 'path/to/local/filename', 'path/on/remote/filename' );
  6.  
  7. // run a command - only works on SSH connections
  8. SSH::into($env)->run( 'shasum path/on/remote/filename.extension', function( $line ) {
  9. // display output of command, by line
  10. echo $line;
  11. } );
  12.  
  13. // download file from remote
  14. SSH::into($env)->get( 'path/on/remote/filename', 'path/to/download/filename' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement