본문 바로가기

ssh

find and remove different ssh host key Once I try to connect a fresh new installed system, which has the same name or ip before through ssh, logging in to the client may fail. The reason is that the new system has the different host key. In that case, find the host key and remove them, and try to connect to it again. The new updated host key will be saved into $HOME/.ssh/known_hosts Find the Host Key as : user@host:~$ ssh-keygen -F 0.. 더보기
ssh connection without typing password Generate Key... # 1) [A] ssh-keygen -t dsa -b 1024 -f $HOME/ssh-key # 2) [A] scp ssh-key.pub B:~/.ssh/ # 3) [B] cat B:~/.ssh/ssh-key.pub >> $HOME/.ssh/authorized_keys [B] chmod 700 $HOME/.ssh/authorized_keys # 4) [B] rm ssh-key.pub # 5) [A] alias B='ssh -i ~/.ssh/ssh-key -Y -C user@B' Make config ... [A] emacs .ssh/config Host * ForwardX11 yes ForwardAgent yes VisualHostKey yes PermitLocalComman.. 더보기
Make a secure PC with sshd and ufw sshd configuration open /etc/ssh/sshd_config file, change and add the following lines LoginGraceTime 60 PermitRootLogin no MaxAuthTries 3 AllowUsers user_name MaxStartups 3:50:10 LoginGraceTime The server disconnects after this time if the user has not suc- cessfully logged in. If the value is 0, there is no time limit. The default is 120 seconds. MaxAuthTries Specifies the maximum number of aut.. 더보기
/usr/bin/X11/xauth: error in locking authority file By using ssh connection , the following problem is happened. /usr/bin/X11/xauth: error in locking authority file $HOME/.Xauthority change owner .Xauthority from root to a normal user. Or delete .Xauthority, and relogin. 더보기