Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Laravel SSH Commands
// see if file exists on remote
SSH::into($env)->exists( 'path/on/remote/filename.extension' );
// upload file to remote
SSH::into($env)->put( 'path/to/local/filename', 'path/on/remote/filename' );
// run a command - only works on SSH connections
SSH::into($env)->run( 'shasum path/on/remote/filename.extension', function( $line ) {
// display output of command, by line
echo $line;
} );
// download file from remote
SSH::into($env)->get( 'path/on/remote/filename', 'path/to/download/filename' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.