Linux
Command
Library
Basics
Tips
Commands
SSH
Connect to host
$
ssh
[user]@[host]
Generate SSH key
$
ssh-keygen
-b 4096
Run a command and exit
$
ssh
[user]@[host] [command]
X11 Session Forwarding
$
ssh
-X [user]@[host]
TCP Port Forwarding
$
ssh
-L [localPort]:[host]:[port] [user]@[host]
SOCKS5 proxying
$
ssh
-D 9999 [user]@[host]
End session
$
exit
$
logout
$ Ctrl+d
Push file
$
scp
[localFile] [user]@[host]:[remoteFile]
$
rsync
[localFile] [user]@[host]:[remoteFile]
Pull file
$
scp
[user]@[host]:[remoteFile] .
$
rsync
[user]@[host]:[remoteFile] .
Copy SSH key to server
$
ssh-copy-id
[user]@[host]
Connect with specific key
$
ssh
-i [keyFile] [user]@[host]
Push directory
$
scp
-r [localDir] [user]@[host]:[remoteDir]
Sync files
$
rsync
-avz [localDir] [user]@[host]:[remoteDir]
Interactive file transfer
$
sftp
[user]@[host]
Mount remote directory
$
sshfs
[user]@[host]:[remoteDir] [localDir]
> TERMINAL_GEAR
Curated for the Linux community
Copied to clipboard
> TERMINAL_GEAR
Curated for the Linux community