ssh Secrets Summary

  1. Run Command on Remote System Without Logging In

    user@user-laptop:~$ ssh tony date
    Mon Aug 30 19:08:40 SPT 2010

    For Program needing pseudo-tty use -t option of ssh. For eg:
    user@user-laptop:~$ ssh tony -t top
    user@user-laptop:~$ ssh tony -t screen -dr

  2. Tilde Tricks

    Tilde (~) is ssh's escape character.
    ~. terminate ssh connection. Specially useful when you loose connection and don't want to wait for ssh timeout.
    ~^z put the connection in background
    ~? list all key sequence

  3. ssh-keygen -R removes bad hostname from your ssh know host

  4. Shortcut Name For Connection

    In ~/.ssh/config enter the following information
    Host bob
         HostName bob.example.com
         Port 2222
         User username

    Host alice
         HostName alice.example.com
         Port 8183
         User username
    now to ssh
    user@user:~$ ssh bob
    user@user:~$ ssh alice
Summarized from http://blog.ksplice.com/2010/08/six-things-i-wish-mom-told-me-about-ssh/

Comments

  1. This comment has been removed by a blog administrator.

    ReplyDelete
  2. This comment has been removed by a blog administrator.

    ReplyDelete

Post a Comment

Comments are moderated. No spam please.

Popular posts from this blog

Perm Root HTC Desire Gingerbread 2.3.3

Increase Free Space On HTC Desire Android Phones

Send SMS Using Gammu Command Line Tool