wiki:TipAndDoc/network/ssh

Version 7 (modified by mitty, 13 years ago) (diff)

--

  • known_hostsから特定のhostのフィンガープリントを削除
    • ssh-keygen -R "hostname"
  • My Cup of Tea / X Forwarding and sudo

    The reason for this is that:

    X authentication is based on cookies — secret little pieces of random data that only you and the X server know… So, you need to let the other user in on what your cookie is (http://www.debian-administration.org/articles/494).

    me@localbox:~$ ssh -X remotebox
    me@remotebox:~$ chmod 644 .Xauthority
    me@remotebox:~$ su - otheruser
    Password:
    otheruser@remotebox:~$ export DISPLAY=localhost:10.0
    otheruser@remotebox:~$ export XAUTHORITY=/home/me/.Xauthority
    

disable certain users to login with ssh

  • /etc/pam.d/sshd
    @@ -15,7 +15,7 @@
    
     # Uncomment and edit /etc/security/access.conf if you need to set complex
     # access limits that are hard to express in sshd_config.
    -# account  required     pam_access.so
    +account  required     pam_access.so
    
     # Standard Un*x authorization.
     @include common-account
    
  • /etc/security/access.conf
    -:USERNAME:ALL
    

avoid sshd brute force