-
The StackOverflow discussion What's ssh port forwarding and what's the difference between ssh local and remote port forwarding [duplicate] has a good visual comparison/explanation of the difference between the
ssh -L
(-L
stands for local) andssh -R
(-R
stands for remote). -
sshtunnel is a Python implementation of SSH …
Operate Remote Servers Using SSH
General Tips and Traps
-
The permissions of the directory
~/.ssh
and its subcontents on both the local machine and the remote server must be properly set in order for SSH login via public key to work. A good pratice is to set the permission of~/.ssh
to700
(on both …
Terminal Multiplexers
-
There are 2 mature popular terminal multiplexer apps: screen and tmux. Both of them are very useful if you want to work on multiple tasks over 1 SSH connection. Screen is relative simple to use while tmux is much more powerful and more complicated to use.
-
Besides enabling users to …
Transfer Files over Network in Linux
Comparison of Network Drives (Remote File System)
-
NFS is very fast but not secure and it is for Unix/Linux only. It is a good choice for local network sharing.
-
Samba is fast, secure and cross-platform. it is good for general purpose sharing and popular in companies.
-
SSHFS is slow …
Configure SSH to Use a Proxy Server
Suppose you have a production server that you want to visit via SSH, however, it is not accessible directly. Instead, you have to visit it from a bastion/proxy server. You can configure SSH to use the bastion/proxy server when visiting the production server.
Host <production_server>
ProxyCommand ssh <proxy_server …
Copy SSH Public Key Using "ssh-copy-id"
You can use the following command to copy your SSH public key to a Linux server.
ssh-copy-id -i ~/.ssh/id_rsa.pub host_machine
However,
if a Linux server runs the SSH deamon on a non default port (default is 22),
you have to specify the port with option -p port
.
In …