Showing posts with label ssh. Show all posts
Showing posts with label ssh. Show all posts

20110714

Offending key in .ssh/known_hosts:<number>

vi .ssh/known_hosts
remove the line, let say if the number is 348
:348
dd
:wq!

20110531

ssh do not display motd

Use quite option:

ssh -q host

20090808

Privilege separation user sshd does not exist

/sbin/init.d # ./secsh start
Privilege separation user sshd does not exist
EXIT CODE: 255


so...

/sbin/init.d # useradd -u 103 -c "sshd privsep" -d /var/empty -s /bin/false sshd

if you want to specify group, -g yourproblem

20090401

SSH through SOCKS proxy

compile connect source and put to any bin
add to ssh config file:
Host *
ProxyCommand connect -S socks.proxy.la %h %p

20080910

Use putty to access vnc using ssh tunnel

This is to overcome firewall which filter connection on the application layer. In putty:

Hostname: ssh_server
X display location: localhost:0
Source port: 5901
Destination: vnc_server:5900


On vnc, connect to localhost:1

20071127

Privilege separation user "sshd" does not exist

Add this line into /etc/passwd,
sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin

and this line into /etc/group
/etc/group:sshd:*:27:

20071123

Could not load host key

Disabling protocol version 1. Could not load host key
Disabling protocol version 2. Could not load host key


The errors above are due to the fact that we didn't create any key pairs for our ssh server.

Create a public key pair to support the new, DSA-based version 2 protocol

# /usr/local/bin/ssh-keygen -d -f /usr/local/etc/ssh_host_dsa_key -N ""
# /usr/local/bin/ssh-keygen -b 1024 -f /usr/local/etc/ssh_host_rsa_key -t rsa -N ""

20070824

ssh client bypass password authentication

client side
$ ssh-keygen -t rsa
$ scp ~/.ssh/id_rsa.pub servername:


server side
$ cat ~/id_rsa.pub >> ~/.ssh/authorized_keys

client side
$ ssh-agent $SHELL
$ ssh servername


DONE!

convenient way is to add `ssh-agent $SHELL` line in shell profile file.


20070821

terminal problem ssh to solaris

set TERM to vt100 before connecting to solaris sshd

TERM="vt100"; export TERM

20061122

Permission denied (publickey).

00:53:52 ssh myuser@my.domain.net
Permission denied (publickey).


If this happen, set value for ChallengeResponseAuthentication to yes.

ChallengeResponseAuthentication yes

20061121

osx : change sshd service port

sudo perl -pi -e 's!^(ssh\s+) \d+/!$1 2200/!' /etc/services # changes it to port 2200

credit to the author.