tianyun 9 月之前
父節點
當前提交
c49357f376
共有 3 個文件被更改,包括 32 次插入4 次删除
  1. 13 1
      README.md
  2. 0 3
      sh_config.sh
  3. 19 0
      ssh_config.sh

+ 13 - 1
README.md

@@ -1,3 +1,15 @@
 # sync
 
-同步一些常用配置
+同步一些常用配置
+
+bashrc 配置
+```
+for file in ~/sync/*_config.sh; do
+    if [ -f "$file" ]; then
+        source "$file"
+    fi
+done
+
+alias sync_config_file='cd ~/sync && git pull && git add . && git commit -m 123 && git push'
+alias vim-config-file='idea ~/sync'
+```

+ 0 - 3
sh_config.sh

@@ -1,7 +1,4 @@
 
-# ssh 配置
-alias ssh-tianyunperfect='ssh -i ~/.ssh/tianyun.pem root@www.tianyunperfect.cn'
-alias ssh-yizhi='ssh -i ~/.ssh/yizhi.pem root@www.yizhigj.com'
 
 
 # 快捷命令

+ 19 - 0
ssh_config.sh

@@ -0,0 +1,19 @@
+# ssh 配置
+alias ssh-tianyunperfect='ssh -i ~/.ssh/tianyun.pem root@www.tianyunperfect.cn'
+alias ssh-yizhi='ssh -i ~/.ssh/yizhi.pem root@www.yizhigj.com'
+
+# 示例一
+# alias ssh-190='expect -c "
+#                spawn ssh root@192.168.10.190
+#                expect \"password:\"
+#                send \"123456\r\"
+#                interact
+#                "'
+
+# znx
+alias ssh-183='ssh root@192.168.10.183'
+alias ssh-190='expect -c " spawn ssh root@192.168.10.190
+               expect \"password:\"
+               send \"123456\r\"
+               interact
+               "'