SSH远程连接配置

如何优雅的配置ssh客户端

Posted by JNaruto on February 11, 2019

Centos 7 sshd 启用密码登录

阿里云Ecs默认ssh服务禁用密码登录,需要修改/etc/ssh/sshd_config PasswordAuthentication yes

优雅的设置客户

  • copy your .pem to your home(Mac OSX : /Users/your name/.ssh/.pem)
  • modify config file (Mac OSX :/Users/your name/.ssh/config ) add like this.

配置文件内容

Host * ServerAliveInterval 60 # ssh alias Host your alias HostName remote host User root #remote host user IdentityFile ~/.ssh/xxx.pem #your pem file

Used ssh

ssh xxx # your alias