goj edited this page Oct 28, 2011 · 7 revisions
Clone this wiki locally

Some random ssh mumbo-jumbo

Copying Identity

Instead of scp-ing, ssh-ing to remote machine (and typing the password again) you can use ssh-copy-id script:

ssh-copy-id -i .ssh/ $REMOTE_MACHINE

More info here.

Logging in via the middle-man

Situation: from machine A you log in to B (middle-man) just in order to log into C. Add something like

Host destination
ProxyCommand ssh middle-man nc %h %p

to your local .ssh/config file. %h can be substituted with destination's IP if there is some DNS/hostname screwup. More info here.

Opening the tunnel


In simple case $MIDDLEMAN == $DESTINATION. Options used:

  • -f - go to background
  • -N - don't execute any commands
  • -L XXX - forward ports

Read this for more details.

channel _: open failed: administratively prohibited: open failed

It may be tunneling turned off or DNS screwup. Try some combination of the following in /etc/ssh/sshd_config:

PermitTunnel yes
UseDNS no

Don't forget to restart the server afterwards.

Logging in takes ages

It may be DNS reverse lookup

UseDNS no