Setup ssh over https access to git server

If you are unlucky working behind firewall trying to connect to github/bitbucket using ssh. Here is the ssh-via-https git server you should redirect to:

GitHub:

ssh.github.com on 443 instead of github.com on 22

https://help.github.com/articles/using-ssh-over-the-https-port

BitBucket:

altssh.bitbucket.org on 443 instead of bitbucket.org on 22

https://confluence.atlassian.com/display/BITBUCKET/Use+the+SSH+protocol+with+Bitbucket

Those entries are added in ~/.ssh/config, on Windows machine it can be either on your %HOMEDRIVE% \ %HOMEPATH%, or C:\Users\your.name\.ssh, run ssh -vT git@github.com or ssh -vT git@bitbucket.org to find out.

Before redirect:

╬╗ ssh -vT git@bitbucket.org
OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
debug1: Reading configuration data /c/Users/fmao.AGLC/.ssh/config
debug1: Applying options for bitbucket.org
debug1: Connecting to bitbucket.org [131.103.20.168] port 22.
debug1: Connection established.
debug1: identity file /c/Users/fmao.AGLC/.ssh/identity type -1
debug1: identity file /c/Users/fmao.AGLC/.ssh/id_rsa type 1
debug1: identity file /c/Users/fmao.AGLC/.ssh/id_dsa type -1
(hang here, if 22 port is blocked.)

After redirect:


╬╗ ssh -vT git@bitbucket.org
OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
debug1: Reading configuration data /c/Users/myusername/.ssh/config
debug1: Applying options for bitbucket.org
debug1: Connecting to altssh.bitbucket.org [131.103.20.174] port 443.
debug1: Connection established.
debug1: identity file /c/Users/myusername/.ssh/identity type -1
debug1: identity file /c/Users/myusername/.ssh/id_rsa type 1
debug1: identity file /c/Users/myusername/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
debug1: match: OpenSSH_5.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
...
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
logged in as maodd.

Custom Git Server

In case you want to connect to your own git server which you have root access, edit the /etc/ssh/sshd_config to add an additional listening port other than 22.

Add a new line with content of ‘Port 443’ right under the line of ‘Port 22’ in /etc/ssh/sshd_config

Restart ssh server: sudo /etc/init.d/ssh restart

Try the same thing in your client machine.

ssh -p 443 yourgitserver.com to ensure 443 can go through your firewall.

Follow the similar hostname setup in .ssh/config file mentioned above.

ref: https://help.ubuntu.com/12.04/serverguide/openssh-server.html

Advertisements

Can not open chm file from network drive

Problem: chm file can be opened locally but not from network drive. Might be an IE7 or windows security patch problem?

Solution:
Change registry:

REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\HTMLHelp]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\HTMLHelp\1.x\ItssRestrictions]
"MaxAllowedZone"=dword:00000003

from MS support solution 2

I used to have a “MaxAllowdZone = 2”, which means opening chm file from internet is not allowed. After changing it to 3, problem went away.

For some reason, this value comes back to default value 2 everyday on my workstation. Might because our company’s policy, so I created a batch file to re-set it on my startup.

reg add HKLM\SOFTWARE\Microsoft\HTMLHelp\1.x\ItssRestrictions /v MaxAllowedZone /t REG_DWORD /d 3 /f

dwl-g650, wireless zero configuration service

Brougt a new wireless card today, but almost couln’t configure it out. The configure window just won’t show up.

Because a usb one was install on my laptop, so I didn’t think it’s a OS problem, until I noticed there is not wireless tab in my network connection property window.

Then google, found this, How could I know dlink pcmcia card is way different than usb!??

Q: The “Wireless Networks” tab is missing in the Wireless Network Connection Properties. I only see the General and Advanced tabs. How do I restore the Wireless Networks tab?

A: The Wireless Networks tab appears when your network adapter fully supports the Wireless Zero Configuration (WZC) service. Check with your wireless adapter vendor for a version of a driver that supports Windows XP and the WZC service. Make sure the WZC service status is started. Click Start, Run, and type “services.msc”. Open Services and scroll down to the Wireless Zero Configuration Service, start the service and set it to automatic.

If it does not show in the list of Services:

1. Run regedit and find

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WZCSVC

2. Add a DWORD entry named “Start” and value “2”.

Warning! If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. I cannot guarantee that you can solve your problem from using Registry Editor, so use the Registry Editor at your own risk.