發表文章

目前顯示的是有「ssh」標籤的文章

Resolve ssh error from Mac OS to Cisco switch/router

圖片
Error message 1. ssh by option -o KexAlgorithms when you meet error message %   ssh -oKexAlgorithms=+diffie-hellman-group1-sha1,diffie-hellman-group14-sha1 account@domain-name or 2. edit /etc/ssh/ssh_config unsharp middle two options and add two options at latest 3 reboot or  configure encryption strength to 2048 bits when you generate keys   references https://www.petenetlive.com/kb/article/0001245 https://www.volico.com/wiki/pages/viewpage.action?pageId=15728687

Generate Private/Public key pair for SSH connection on MacOS / Linux

圖片
 1. use keygen on Client PC to generate ed25519 key pair stored in ~/.ssh/, their default name are id_ed25519 and id_ed25519.pub, and the account names on Client PC and Server are the same.    # .pub is public key and non .pub is private key $ ssh-keygen -t ed25519               #you should setup a passphrass 2. check and copy the public key to remote server $ ssh-copy-id -n YourAccount@YourServer  # YourAccount stands for the account names on Client PC and Server, -n: try run $ ssh-copy-id  YourServer 3. connect by ssh tunnel form client to Server as figure 1. $ ssh YourAccount@YourServer      # authenticate with  passphrass only, not account password on Server (Figure 1.) 4. Finally, if you want to passwordless login with ssh, empty passphrase while executing ssh-keygen processing References LPIC-1 STUDY GUILDE, SYBEX