Tag Archives: ssh

Use Subversion with SSH on non standard port / svn on ssh tunnels

server 端:

rimmon@chicago:~$ pwd

/home/rimmon

rimmon@chicago:~$ svnadmin create SVN

改 SVN/conf/svnserve.conf

[general]
anon-access = none
password-db = passwd
realm = Chicago_SVN

client 端:

在 ~/.subversion/config

加上

### Section for configuring tunnel agents.
[tunnels]
mmm = ssh -p 2200 -q


checkout :

svn co svn+mmm://chicago.monster.tw/home/rimmon/SVN .

 

Screenshot 2016 08 27 21 16 32

 

cat .subversion/config

 

[tunnels]
foo = ssh -p 2200
### Configure svn protocol tunnel schemes here. By default, only
### the ‘ssh’ scheme is defined. You can define other schemes to
### be used with ‘svn+scheme://hostname/path’ URLs. A scheme
### definition is simply a command, optionally prefixed by an
### environment variable name which can override the command if it
### is defined. The command (or environment variable) may contain
### arguments, using standard shell quoting for arguments with
### spaces. The command will be invoked as:
### <command> <hostname> svnserve -t
### (If the URL includes a username, then the hostname will be
### passed to the tunnel agent as <user>@<hostname>.) If the
### built-in ssh scheme were not predefined, it could be defined
### as:
# ssh = $SVN_SSH ssh -q
### If you wanted to define a new ‘rsh’ scheme, to be used with
### ‘svn+rsh:’ URLs, you could do so as follows:
# rsh = rsh
### Or, if you wanted to specify a full path and arguments:
# rsh = /path/to/rsh -l myusername
### On Windows, if you are specifying a full path to a command,
### use a forward slash (/) or a paired backslash (\\) as the
### path separator. A single backslash will be treated as an
### escape for the following character.

 

svn co svn+foo://nyc.monster.tw/home/SVN/repos .

 

backup AWS script using rsync and ssh

# 
rsync -avz -e 'ssh -i 遠端的KEY' 遠端帳號@遠端IP:遠端目錄 近端目錄
#

——
——
example:

cat RUN_backup_aws.sh 
#/bin/sh
/usr/bin/rsync -avz -e 'ssh -i /home/xxx/_AWS/key_xxx.pem' ec2-user@www.monster.com.tw:/etc /home/xxx/_AWS/BACKUP
/usr/bin/rsync -avz -e 'ssh -i /home/xxx/_AWS/key_xxx.pem' ec2-user@www.monster.com.tw:/var/www /home/xxx/_AWS/BACKUP
/usr/bin/rsync -avz -e 'ssh -i /home/xxx/_AWS/key_xxx.pem' ec2-user@www.monster.com.tw:/home/ec2-user /home/xxx/_AWS/BACKUP

透過 TOR 作 SSH / MSN 跳板 ( socks4 )

要先裝好 tor , 啟動 tor 後 , 用 putty 照下面的設定就好了

擷取-tor-ssh

這是透過 tor network 的出口點的 traceroute 

8  r02-s2.tp.hinet.net (220.128.4.42)  3.919 ms r02-s2.tp.hinet.net (220.128.4.38)  3.863 ms  3.812 ms
9  r12-pa.us.hinet.net (211.72.108.193)  133.255 ms  133.232 ms *
10  r11-ny.us.hinet.net (202.39.83.105)  253.503 ms  253.630 ms  253.790 ms
11  US-NY-RI-01.chello.com (198.32.160.48)  258.488 ms  255.308 ms  259.752 ms
12  213.46.190.93 (213.46.190.93)  252.272 ms us-nyc01b-rd1-10ge-3-0.aorta.net (213.46.190.177)  252.482 ms  252.557 ms
13  213.46.190.50 (213.46.190.50)  258.266 ms *  258.407 ms
14  fr-par02a-rd1-pos-2-0.aorta.net (213.46.160.105)  339.525 ms  339.944 ms  339.758 ms
15  ch-gva01a-ra1-xe-1-0-0.aorta.net (213.46.160.26)  352.450 ms  352.673 ms  352.191 ms
16  mlrZHZ006-xge-3-4.aorta.net (213.46.171.54)  357.266 ms  362.542 ms  355.218 ms
17  * * *
18  80-218-145-22.dclient.hispeed.ch (80.218.145.22)  505.819 ms  508.504 ms  544.136 ms

擷取-tor-msn