Wednesday, April 15, 2015

How to use a proxy for common applications

Global environment
Set the HTTP_PROXY environment variable
export HTTP_PROXY=http://username:password@proxy.server:port/  
Create the file /etc/apt/apt.conf.d/43proxy and place the line below (be sure to provide the appropriate proxy information):
Acquire::http::Proxy "http://username:password@proxy.server:port/";
Set the proxy settings in /etc/wgetrc


Use the command below:
git config --global http.proxy http://username:password@proxy.server:port/

Monday, April 13, 2015

SSH without user-known hosts checking

If the IP address of the host you are connecting to frequently changes, as in the case of cloud instances, but you are sure that that you are connecting to the correct host, you can use the following ssh command to disable known host checking (Note: This may lead to MITM attacks).
ssh -o UserKnownHostsFile=/dev/null user@10.0.3.x