Wednesday February 28, 2007
SSH Cheat Sheet
This is offered for those who want to kick their telnet habit. I also offer a simple text version, which you can keep in ~/.ssh.
srchost$ ssh-keygen -t rsaThis will create id_rsa and id_rsa.pub in ~/.ssh. "-t dsa" can be used instead. You will need an SSH key if you want to log in to a system without supplying a password.
srchost$ ssh desthost desthost$Simply add the contents of srchost:~/.ssh/id_rsa.pub to desthost:~/.ssh/authorized_keys in the form "ssh-rsa AAAkeystringxxx= myusername@srchost".
Just use "-X":
srchost$ ssh -X desthost desthost$ xterm
Add something like this:
Host paedata Hostname paedata.sfbay User tc35445to srchost:~/.ssh/config
If I find that my key is not being recognised on desthost (I still get prompted for a password), I probably have a premission problem. try this as the user on desthost:
cd chmod g-w,o-w . chmod g=,o= .ssh .ssh/authorized_keys
- Edit /etc/ssh/sshd_config, change line to
PermitRootLogin yes- Solaris 9 & earlier:
# /etc/init.d/sshd restartSolaris 10 & later:
# svcadm restart sshHere is a patch (will save the originial config file in sshd_config.orig)
/usr/bin/patch -b /etc/ssh/sshd_config << 'EOT' --- sshd_config.orig Fri Feb 2 11:27:12 2007 +++ sshd_config Fri Feb 23 14:12:24 2007 @@ -129,7 +129,8 @@ # Note that sshd uses pam_authenticate(3PAM) so the root (or any other) user # maybe denied access by a PAM module regardless of this setting. # Valid options are yes, without-password, no. -PermitRootLogin no +#PermitRootLogin no +PermitRootLogin yes # sftp subsystem Subsystem sftp /usr/lib/ssh/sftp-server EOT
Reconfigure of desthost - this happens when you (re-)install Solaris. You can avoid it by restoring /etc/ssh/ssh_host_*_key*. Otherwise:
bash$ ssh katie @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Someone could be eavesdropping on you right now(man-in-the-middle attack) It is also possible that the RSA host key has been changed. The fingerprint for the RSA key sent by the remote host is md5 8e:c4:53:93:64:5b:2d:b4:f8:e9:a8:9c:d9:95:4a:70. Please contact your system administrator. Add correct host key in /home/tc35445/.ssh/known_hosts Offending key is entry 3 in /home/tc35445/.ssh/known_hosts RSA host key for katie has changed and you have requested strict checking.Solution - remove the "katie" entry in ~/.ssh/known_hosts and log-in again - ssh will put a new host key in for you.
Posted at 01:53PM Feb 28, 2007 by timc in Sun | Comments[1]
Thursday February 22, 2007
nicstat - now for Linux, too
Just a quick one to flag that I have released a version of nicstat for Linux (see latest blog on nicstat).
I do not have a myriad of Linux systems to test it on, so if anyone finds any issues, please let me know.
Posted at 05:45PM Feb 22, 2007 by timc in Performance |
Wednesday February 14, 2007
nicstat - the Solaris Network Monitoring Tool You Did Not Know You Needed
This is a placeholder entry - see the latest blog on nicstat, for the current source and binaries.
Posted at 05:29PM Feb 14, 2007 by timc in Performance |