
function pick<T, U extends keyof T>(data: T, keys: U[]): { [K in U]: T[K] } { const obj: any = {}; for (const key of keys) { obj[key] = data[key]; } return obj; } const user = { name: 'Tom', age: 19, }; pick(user, ['name', 'age']);
function pick<T, U extends keyof T>(data: T, keys: U[]): { [K in U]: T[K] } { const obj: any = {}; for (const key of keys) { obj[key] = data[key]; } return obj; } const user = { name: 'Tom', age: 19, }; pick(user, ['name', 'age']);
ListenAddress 改为 0.0.0.0 或 ip地址
PermitRootLogin 改为 yes
使用 systemctl restart sshd 重启
scp local_file remote_username@remote_ip:remote_folder
scp local_file remote_username@remote_ip:remote_file
scp -r local_folder remote_username@remote_ip:remote_folder
scp remote_username@remote_ip:remote_folder local_file
scp remote_username@remote_ip:remote_file local_file
scp -r remote_username@remote_ip:remote_folder local_folder