Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
rb:ssh [08/09/2018 00:33]
andrew [Timeout]
rb:ssh [21/02/2020 13:38] (current)
andrew [SSH Agent]
Line 64: Line 64:
  
 ===== Debug config sshd_config ===== ===== Debug config sshd_config =====
 +
 Running the sshd daemon in the foreground allows any error messages to be seen, in this example, syslog was just showing lots of starts and stops and then a final fatal ''​init:​ ssh respawning too fast, stopped''​ message. Also by specifying a different port to 22, you can avoid interfering with the normal sshd operation. Running the sshd daemon in the foreground allows any error messages to be seen, in this example, syslog was just showing lots of starts and stops and then a final fatal ''​init:​ ssh respawning too fast, stopped''​ message. Also by specifying a different port to 22, you can avoid interfering with the normal sshd operation.
  
Line 73: Line 74:
 root@ftphost01:/​etc/​ssh#​ root@ftphost01:/​etc/​ssh#​
 </​code>​ </​code>​
 +
 +
 +===== SSH Agent =====
 +
 +
 +Add this to your .bash_profile:​
 +<​code>​
 + ​SSHAGENT=/​usr/​bin/​ssh-agent \\
 + ​SSHAGENTARGS="​-s"​ \\
 + if [ -z "​$SSH_AUTH_SOCK"​ -a -x "​$SSHAGENT"​ ]; then
 +    eval `$SSHAGENT $SSHAGENTARGS`
 +    trap "kill $SSH_AGENT_PID"​ 0
 + fi
 +</​code>​
 +
 +
 +
 +===== Regenerate ssh keys =====
 +
 +
 +  root@usta02:​~#​ cd /etc/ssh/
 +  root@usta02:/​etc/​ssh#​ ls
 +  moduli ​     sshd_config ​      ​ssh_host_dsa_key.pub ​ ssh_host_ecdsa_key.pub ​ ssh_host_rsa_key.pub
 +  ssh_config ​ ssh_host_dsa_key ​ ssh_host_ecdsa_key ​   ssh_host_rsa_key ​       ssh_import_id
 +  ​
 +  root@usta02:/​etc/​ssh#​ rm ssh_host_* old/
 +  ​
 +Create new keys:-
 +
 +  root@usta02:/​etc/​ssh#​ dpkg-reconfigure openssh-server
 +  Creating SSH2 RSA key; this may take some time ...
 +  Creating SSH2 DSA key; this may take some time ...
 +  Creating SSH2 ECDSA key; this may take some time ...
 +  ssh stop/​waiting
 +  ssh start/​running,​ process 2258
 +  ​
 ===== Multifactor Auth ===== ===== Multifactor Auth =====
  

rb/ssh.1536366830.txt.gz ยท Last modified: 08/09/2018 00:33 by andrew