Skip to main content
ssh Secrets Summary
- 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
- 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
- ssh-keygen -R removes bad hostname from your ssh know host
- 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/
This comment has been removed by a blog administrator.
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDelete