ssh tips
Password-less authentication:
You can read long version
Using ssh agent:
Ssh agent remembers password for your private key, so you only have to type it once in a session, not every time it’s used.
Start ssh agent: ssh-agent Add keys: ssh-add List currently loaded keys: ssh-add -l
Cygwin and ssh agent:
Links:
Add this to ~/.bashrc:
## Enable ssh agent
export SSH_AUTH_SOCK=/tmp/.ssh-socket

ssh-add -l \>/dev/null 2\>&1

if [ $? = 2 ]; then
 # Exit status 2 means couldn’t connect to ssh-agent; start one now
 rm -rf /tmp/.ssh*
 ssh-agent -a $SSH_AUTH_SOCK >/tmp/.ssh-script
 . /tmp/.ssh-script
 echo $SSH_AGENT_PID >/tmp/.ssh-agent-pid
fi

function kill-agent {
 pid=`cat /tmp/.ssh-agent-pid`
 kill $pid
}

function addkeys {
 ssh-add ~/.ssh/id_dsa*
}
Set an alias for a hostname
In ~/.ssh/config:
Host dev30
    HostName dev30.kowalczyk.info
    User root
    IdentityFile ~/.ssh/id_dsa_dev30
ssh unix reference
Feb 12 2023

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you: