create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
| Environment Variable | Path |
|---|---|
%ALLUSERSPROFILE% |
C:\Documents and Settings\All Users |
%APPDATA% |
C:\Documents and Settings{username}\Application Data |
%COMMONPROGRAMFILES% |
C:\Program Files\Common Files |
%COMMONPROGRAMFILES(x86)% |
C:\Program Files (x86)\Common Files |
I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).
Use ssh keys and define host aliases in ssh config file (each alias for an account).
| import ctypes, time | |
| SendInput = ctypes.windll.user32.SendInput | |
| # C struct redefinitions | |
| PUL = ctypes.POINTER(ctypes.c_ulong) | |
| class KeyBdInput(ctypes.Structure): | |
| _fields_ = [("wVk", ctypes.c_ushort), | |
| ("wScan", ctypes.c_ushort), | |
| ("dwFlags", ctypes.c_ulong), |
If you want to SSH to a VPS which is running openVPN do the following:
source: https://serverfault.com/questions/659955/allowing-ssh-on-a-server-with-an-active-openvpn-client
The problem is that the default gateway gets changed by OpenVPN, and that breaks your current SSH connection unless you set up appropriate routes before you start OpenVPN.
What follows works for me. It uses iptables and ip (iproute2). Below, it is assumed that the default gateway interface before OpenVPN is started is "eth0". The idea is to ensure that when a connection to eth0 is made, even if eth0 is not the default gateway interface anymore, response packets for the connection go back on eth0 again.
You could use the same number for the connection mark, firewall mark and routing table. I used distinct numbers to make the diffences between them more apparent.
Any directory with __init__.py is considered a package in Python.
Any python files inside a package is considered a module.
Modules contain functions and other bindings that is always exported.
If you are outside the package, and you want to import a module from a package: