分类 默认分类 下的文章

java GCViewer

最新的 GCViewer 项目地址
https://github.com/chewiebug/GCViewer

不用下载 GC.log 可以直接给它一个远程 URL.

ssh

There are other SSH commands besides the client ssh. Each has its own page.

ssh-keygen - creates a key pair for public key authentication
ssh-copy-id - configures a public key as authorized on a server
ssh-agent - agent to hold private key for single sign-on
ssh-add - tool to add a key to the agent
scp - file transfer client with RCP-like command interface
sftp - file transfer client with FTP-like command interface
sshd - OpenSSH server

The ssh program on a host receives its configuration from either the command line or from configuration files ~/.ssh/config and /etc/ssh/ssh_config.
configuration items:
https://www.ssh.com/ssh/config/

https://www.ssh.com/ssh/key/
https://www.ssh.com/ssh/command/

docker file cheat sheet

Version 0.0.1

FROM ubuntu:16.04

RUN apt-get update; apt-get install -y nginx
RUN echo 'hi, i am here' > /var/www/html/index.html

ENV http_proxy=proxy.tianxiaohui.com
ADD latest.tar.gz /var/www/wordpress
COPY somefile /var/some_place/ #compare to ADD, no magic
VOLUME ["/opt/project", "/data"]
WORKDIR
USER user:group
ARG webapp_user=user
ONBUILD
LABEL location="Shanghai" type="ep" //add image metadata
EXPOSE 80

ENTRYPOINT ["/usr/local/bin/my.sh", "-g"] #docker run command will be as argument for this
CMD ["/usr/local/bin/my.sh", "-l"] #only the last one works,and maybe override by docker run
#docker run --entrypoint 可以覆盖ENTRYPOINT, docker run 后边的command可以覆盖 CMD,如果有entrypoint, cmd 做参数

关于 ip tunnel 端口转发

The AllowTcpForwarding option in the OpenSSH server configuration file must be enabled on the server to allow port forwarding. By default, forwarding is allowed.

local forwarding:
$ ssh -L 80:intra.example.com:80 gw.example.com
$ ssh -L 127.0.0.1:80:intra.example.com:80 gw.example.com

remote forwarding:
$ ssh -R 8080:localhost:80 public.example.com
$ ssh -R 52.194.1.73:8080:localhost:80 host147.aws.example.com
$ ssh -R 2222:d76767.nyc.example.com:22 -R 5432:postgres3.nyc.example.com:5432 aws4.mydomain.net

https://www.ssh.com/ssh/tunneling/example
https://www.ssh.com/ssh/tunneling/
https://stackoverflow.com/questions/3653788/how-can-i-connect-to-oracle-database-11g-server-through-ssh-tunnel-chain-double

https://www.cyberciti.biz/faq/linux-unix-ssh-proxycommand-passing-through-one-host-gateway-server/