Linux login without passwd, port forwarding, X11 forwarding
Login in Without Password
simply exec
$ ssh-keygen
press enter till the end, then exec
$ ssh-copy-id user@host (from client to host, the host is the server you want to log in)
enter password, done! next time you don’t need password to log in.
Port forwarding and X11 forwarding
When login, simple add -L (port forwarding), and optional -X (X11 forwarding)
$ ssh -X -L port: localhost: port user@host
first port is the client machine’s localhost’s port
localhost is the server machine’s url , can be diff of localhost, e.g. google.com , where server machine’s internet access google.com, that is the idea of proxy, e.g. access google from China (client machine) login to server machine, forwarding server machine’s access of google to client machine’s localhost
second port is the port of the middle url (localhost in this case), if this port set to 80, it is the default webpage, where we do not need to specify port