zl程序教程

您现在的位置是:首页 >  移动开发

当前栏目

macos terminal 设置别名 alias

macos 设置 别名 Alias terminal
2023-09-14 09:09:52 时间

macos terminal 设置别名 alias

2,ssh免密钥登陆

  • 拷贝公钥到192.168.1.5
ssh-copy-id -i .ssh/id_rsa.pub root@192.168.1.5
  • 免密钥登陆到192.168.1.5
ssh root@192.168.1.5

1,设置别名alias

vim .bash_profile
tail .bash_profile
	#设置别名
	alias kali='ssh root@192.168.1.5'
source .bash_profile
  • alias查看别名列表
  • 免密钥登陆成功
$ kali

  1. Mac添加命令别名
  2. Linux命令大全(手册)
  3. SSH 设置密钥对实现免密码连接
  4. ssh-keygen、ssh-copy-id实现ssh无密码登录