2024-08-08 (Thu)¶
今天做了一下开发机的迁移,记录一下做了哪些事情。
ssh¶
宿主机上开了新的 ssh-keygen -t rsa -b 4096 -C <my_email>
,然后将 22_id_rsa.pub
扔到了新机器的 ~/.ssh/authorized_keys
里面;并在宿主机的 ~/.ssh/config
里面加了一条:
Host 22
HostName ...
User dev
IdentityFile ~/.ssh/22_id_rsa
这样就可以 ssh 22
连上了!
zsh¶
function scp_multi() {
for item in "$@";
do scp -r "dev:$item" "22:$item";
done;
};
scp_multi "~/.zshrc" "~/.oh-my-zsh" "~/.p10k.zsh"
,还拼接了 ~/.zsh_history
。
scp_multi "~/.aliyun" "~/.auth" "~/.aws" "~/.bashrc"
scp_home_multi .huge-config.toml .huge-cli-config.toml .gitconfig .condarc
scp_home_multi .auth .aws .kube scripts
scp_multi "~/.jfrog/jfrog-cli.conf.v6"