Version 2.

4

Bowden Systems Inc.
Norcross, GA 30092 http://www.bsi2.com

Notice
The information contained in this document is subject to change without notice.

BOWDEN SYSTEMS MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS MANUAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Bowden Systems shall not be liable for errors contained herein or direct, indirect, special, incidental or consequential damages in connection with the furnishing, performance, or use of this material.

Warranty
A copy of the specific warranty terms applicable to your BSI product can be obtained from the BSI Corporate Office.

Printing History
The printing date will change when a new edition is printed. Minor changes may be made at reprint without changing the printing date. The manual part number will change when extensive changes are made. Manual updates may be issued between additions to correct errors or document product changes. To ensure that you receive these updates or new editions, contact the BSI Corporate Office. October 2001 . . . Edition 1 February 2002 . . . Edition 2 June 2003....Editon 3 July 2004...Edition4 Feb 2008...Edition 5 March 2008...Edition 5a Bowden Systems, Inc. 3500 Parkway Lane, Suite 370 Norcross, GA 30092, USA email:sales@bsi2.com web:www.bsi2.com © 2001- 2008 Bowden Systems, Inc.
NSK-SSH, sftp-server-guardian, scmd is a trademark of Bowden Systems Inc. Nonstop, TEDIT, TACL, Guardian 90, 6530, PATHWAY are trademarks of HP. Mr-win6530 is a trademark of Conforte. Cail6530 is a trademark of Cail.

Preface
This manual explains how to install, configure, and use NSK-SSH software for the HP NonStop server. This includes setting up the components of the software which are the ipssh, sshd, and prngd.

Audience and Prerequisites
This manual is intended for system managers and assumes that the user has experience with OSS, GUARDIAN, TCPIP, PTCPIP and SCF.

Prerequisite Equipment
This manual also assumes that the user’s host is S-Series running GUARDIAN G06.22 or higher, GUARDIAN H-Series running H06.05 or higher, or GUARDIAN J-Series J06.02 or higher. This software works with TCPIP V4 and TCPIP V6 tcpip stacks.

iii

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 ssh-keyscan. . . 19 7. . . . . . . . . . . . . . . . . . . . . . . . . . . 101 APPENDIX D . . . . . . . . . . . . . . . . . . .sh . . . INFORMATION. . . . . . . . . . . . . . . . . . . . . . . . OVERVIEW. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 6. . . . . 33 sshd. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . BASIC SETUP OF SSH. . . . . . . 13 5. . KNOWN PROBLEMS. . . . . . . . . . . . . . . . . . . . 21 8. . . . . . . . . . . 63 sftp. . . . . . . . . . . . . . . . . . . . 77 APPENDIX B . . . . . . . . . .1. . . . 3 3. . . . . . . 97 sshd_config FILE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ADVANCED SETUP OF SSH. . . . .IPSSH ON CPU 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TELNET ISOLATION. . . . . . . . . . . . . . . . . . . . . . . . . .REQUIRED FILES. . . . . . . . . . . . . . CHECKING YOUR SESSION ACCESS VIA UNIX CLIENT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 b. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 prngd. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .SSHD using two IP stacks. . . . .MAN PAGES. . . . . . . . 71 ssh-agent. . . . . . . . . . . . . . . . . . . . . . . INSTALLING THE SOFTWARE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 start_ipssh_ztc0a. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 start_ssh_2_cpu_2stack. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2. . . KERNEL SUBSYSEM. . . . . . . . . . . . . . . 59 sftp-server-guardian. . . . . . . . . . . . . . . . . . . . . . 103 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 sftp-server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 scmd. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 ssh. . . . . . . . . . . 65 scp. . . . . . . .TELNET ISOLATION. CHECKING YOUR SESSION ACCESS VIA PC CLIENT. 69 ssh-add. . . . . . . .sh . . . . . . . 97 ssh_config FILE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 4. . . . . . . . . . . . . 99 APPENDIX C . . . . . . . . . . . . . . . . . . . 27 ssh-keygen. . . . . . . . . . 22 APPENDIX A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .ZZKRN FILES. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 a. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 ipssh. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 ipztc00a . .IPSSH ON CPU 0 . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .PRNGD ON CPU 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .ipztc00b . . . . 105 ranztc0a -PRNGD ON CPU 1. . .sh . .sh . . . . 108 start_sshd_ztc00b. . . . . . . . . . . . . . . .sh . . . . . . . . . . . . . . . . . . . . . .IPSSH ON CPU 1. . . . . . . . . . . . . . 104 start_ipssh_ztc0b. . . . . . . . . . . . . . . . . .SSHD ON CPU 1. . . . . . . . . . . . . .SSHD ON CPU 0 . . . 106 start_random_ztc0b. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 sdztc00a -SSHD ON CPU 0. . . . .sh . . . . . . . . . . . . . . . . . . . . . . . . 108 . . . . . . . . . . . . . . 107 sdztc00a -SSHD ON CPU 1. . . . . 107 start_sshd_ztc00a. . . . . . . . . . . . . . . . . . . . . . . . . .sh . . . . .PRNGD ON CPU 01. . . . . . . . . . . . . . 105 start_random_ztc00a. . . . . . . . . . . . . . . . . . . . . . .IPSSH ON CPU 1. . 104 ranztc0a -PRNGD ON CPU 0. . . . . . . . .

4 that is based on OpenSSH 2. In this release. This provides compatibility with programs such as FileZilla. This new command is called scmd and allows you to execute remote commands from the NonStop system. This can be purchased from the Oreilly web site (www.9. This was created do to the need of users that have PCI requirments of not having TELNET running on the system or FTP. This document will tell you how to install and configure NSK-SSH software for access to the system and provide a reference for the MAN pages included with the NSK-SSH software.4 Page 1 March 31.15 for the G06. you should consult “SSH The Secure Shell” by Daniel J.com). Now you can have up to 4 random number generators per TCPIP V4 OR V6 stack or up to 64 with PTCPIP using the round-robin method of access . This release has also been verified to work with Mr-Win6530. The NSK-SSH has been updated to fix various problem the the random number generator and has move to using TCPIP for the communications between the random number generator and the SSH process. 2008 . This release will allow you to access the NonStop system in a secure manor for session and ftp access. This software works with alias and standard GUARDIAN users. If you require more detailed information on SSH. This installation document assumes that you have OSS. You no longer need to have the OSS local socket program running. This also include the ability to access an isolated TCPIP stack which has telnet running on it for the telnet requirment of SSH. This allows you to access the guardian file system just like the unix file system. We also have added an sftp-server for the guardian file system.SUPER or root user id.22/H06. The random number generator does not require any external programs or files for generating its random numbers.x security enhancements and PRNGD 0. Barrett & Richard E. NSK-SSH V2.9p2 with 3. we also added a new command to address problem with executing remote commands from the system. and TCP/IP installed and configured on your system.4.02 operating system. Silverman.OVERVIEW This is a release of the NSK-SSH V2.9. We now also have the ability to set up all the components of this release in the KERNEL (ZZKRN) subsystem for full fault resilance. You should install this software using the SUPER.05/J06.oreilly.

Note: This page is left blank for double sided printing. NSK-SSH V2.4 Page 2 March 31. 2008 .

2008 .Z | pax -rvf - For the H-Series and J-Series operating system: export PATH=$PATH:/bin/unsupported:/bin zcat SSH_H0605_V24.super to install this software.tar. SSH and PRNGD software.Z | pax -rvf - Note that zcat is in the /bin/unsupported directory.tar.4 Page 3 March 31.INSTALLING THE SOFTWARE You must be the root user or super. do the following: For the S-Series: export PATH=$PATH:/bin/unsupported:/bin zcat SSH_GO622_V24. IPSSH. This will install the software into the following directories: /etc/ /etc/ssh /usr/local/ssh /usr/local/random Now you are ready to set up the. To install the software that was downloaded from the web site. Note that the above tar file may have a version indicator on it. NSK-SSH V2.

2008 .Note: This page is left blank for double sided printing.4 Page 4 March 31. NSK-SSH V2.

TCPIP V4 or V6 Installed and Configured OSS Sockets Started on each processor. e. Know how to use the text editor “vi”.bsi services cp protocols. b. You should have the following products installed on your system: a.bsi to services and protocols. SSH Client Software ( Mr-Win6530.4 Page 5 March 31. TELNET servr running on the TCPIP stack LOCAL LOOP BACK STARTED for TCPIP stack REMOVE ANY OPENSSH ssh software on your system as this will cause problems with installing and startup up the Bowden Systems version of SSH. Cail6530.bsi to protocols.BASIC SETUP OF SSH To set up your system so that you use the SSH software. b. then you need to make sure that has the following line: telnet 23/tcp NSK-SSH V2. If you do not have these files. then you can copy the files services. TCPIP configure for OSS. Unix SSH) 2. Putty. Verify that you have the services and protocols file in the /etc directory. d. You will need the following information: a. you should do the following: 1. 2008 . c. f. The ip address and stack process name you will use for SSH access. IMPORTANT FOR TELNET ACCESS cd /etc cp services.bsi protocols Note that the service that the sshd program is looking for is the telent service. If you alreay have a services file. c. OSS Installed and Configured. g.

or that you want to random number generator to use. then it is not necessary to do this step. a.profile”. But if you are using some other tcpip process name. Set your PATH and MANPATH variables.sh 5. 4. Execute a script to change the file setting sh -v . do the following: add_define =TCPIP^PROCESS^NAME file=\$ZTC1 Note that this is an example. do the following: info_define all To add the define. Set the correct file settings on the installed files. 3. THE TELNET ACCESS TO SSH WILL NOT WORK. export PATH=$PATH:/usr/local/ssh/bin:/usr/local/ssh/sbin export PATH=$PATH:/usr/local/random/bin export PATH=$PATH:/usr/local/ssh/install export MANPATH=$MANPATH:/usr/local/ssh/man export MANPATH=$MANPATH:/usr/local/random/man Note that these can be place in /etc/profile or in your private home directory file “. NOTE IF YOU DO NOT HAVE A /etc/services FILE. Verify that the define =TCPIP^PROCESS^NAME is already set./ssh_install_chmod. Move to the install directory cd /usr/local/ssh/install b. If you are using the default tcpip process name $ZTC0. You should use what ever tcpip process name is defined on your system.4 Page 6 March 31.If the services program does not have this line. NSK-SSH V2. then you need to add it using vi. 2008 .

RSA Private Key ssh_host_rsa_key.0.1 port 790.DSA Public Key 8.0.sh This will generate the following files in the /etc/ssh/ directory: ssh_host_key .pub .pub . Execute a script to startup the random number generator.0 and change the 0. Execute a script to generate the system wide keys. To make this change.0. sh -v . do the following: vi /etc/ssh/sshd_config Find the line: ListenAddress 0. !!!! IMPORTANT STEP NOT TO FORGET !!!! a.1 for the two cpu or greater configuraiton.0.6.RSA Public Key ssh_host_dsa_key ./start_random.0.sh This will start the random number generator on local sockets connection 127.0.DSA Private Key ssh_host_dsa_key.4 Page 7 March 31. The script executes the following: run cpu=0 -gpri= 144 prngd tcp/localhost:790 7. This must be started before any SSH software can be used.0. Start up the Random number generator (PRNG). Note if you are using TCPIP V4 then you should set this to 127. sh -v . Note that this may take a while. 2008 .0 to the ipaddress of your system and save the file.Host Private Key ssh_host_key. This is only needed if you ssh to listen again a specific address.pub . Move to the install directory cd /usr/local/ssh/install b. Generate the system keys. Modify the system wide configuration to the specify the IP address that the SSHD program will use. This step is optional./ssh_install_makekeys.Host Public Key ssh_host_rsa_key .0. NSK-SSH V2.

If you want to start ssh on one cpu. then continue reading.0. If there is more than one address associated with the stack then.9.0. To start the sshd program do the following: run -cpu=0 -gpri=125 /usr/local/ssh/sbin/sshd This will start the sshd server and it will listen on port 22 for any connection. If you are starting the Bowden NSK-SSH software on a system that has the Comforte SSH software on it and configured to use the port 22 on $ztc0. If this is running. scf> assume process $zzkrn scf>names You should look for #ssh-ztc0.0 If you want to start the program in the debug mode to see what it is doing. then you need to stop this software. scp. then you should not change the ListenAddress to 127. ssh and sftp). scf> abort #ssh-ztc0 This will abort the process and then you can start up the NSK-SSH software.0. NSK-SSH V2. 10.4 Page 8 March 31. If you only run one SSHD server.1 and change it to the real address of the stack. before you can startup the NSK-SSH software. 2008 . If you want to start SSHD on two cpu’s scipt to step 10. then you need to stop it. The sshd program will process all request (session. do the following: /usr/local/ssh/sbin/sshd -d -d -d This will allow one session to be processed and then the program will exit when the request is finished. you should leave it set to 0.0.

sh 2. Using the startup file: cd /usr/local/ssh/install sh -v . a. Starting SSH on two cpu’s using regular TCPIP or P/TCPIP in Failover mode If you want to distribute the load of your SSH process over two cpu’s. Start the SSHD process on port 700 and 701. run -cpu=0 /usr/local/ssh/sbin/sshd run -cpu=1 /usr/local/ssh/sbin/sshd NSK-SSH V2. Starting it manually. the TCPIP V6 software is configured in fail-over mode and not configurated for round-robin./start_ssh_ptcpip_2cpu. Using the startup file: cd /usr/local/ssh/install sh -v .sh 2. You can execute the file start_ssh_2_cpu. we put this startup file in as example of how to run the SSHD server on a system that is uses that configuration. Start the SSHD processes on port 22./start_ssh_2_cpu. a. Starting it manually. run -cpu=0 -gpri=120 /usr/local/ssh/sbin/sshd -p 700 run -cpu=1 -gpri=120 /usr/local/ssh/sbin/sshd -p 701 b. run -cpu=1 /usr/local/ssh/sbin/ipssh -wait 0 11. If you want to distribute the load of your SSH process over two cpu’s. Starting SSH on two cpu’s using P/TCPIP with round-robin configuration.sh or do the following: 1. Note that on most systems. You can execute the file start_ssh_2_cpu. Start the primary IPSSH ($ISX) process. run -cpu=0 /usr/local/ssh/sbin/ipssh sleep 5 c. Start the backup IPSSH ($ISY) process.4 Page 9 March 31.sh or do the following: 1.10. 2008 .

NSK-SSH V2. 2008 .Note that you can use this configuraiton on TCPIP V4 if there is more than one IP addres define to the TCPIP stack and it is not in the FAIL-OVER configuraiton.4 Page 10 March 31.

scf> assume process $ztc99 scf> aler subnet #loop0.sh. we will talk about advanced set up of the SSH software including the KERNEL subsystem and TELNET isolation. 2008 . TELNET ISOLATION For those of you that want to stop all of your telnet and ftp processes on the system. To use this feature. we have a solution that allows you to do this execpt for an isolated TCPIP stack with telnet running on the loop back port. The idea is the run the TCPIP process on your systems that is not attached to any hardware and only use the loop back port.PRI 190. Start the #LOOP0 port on the stack. In our script call start_sshd_2cpu_2stack. This #LOOP0 is started and a TELSRV process is started against this and no listner process. we use the TCPIP process name $ztc99.CPU 0. With this configuration. Start up the TCPIP V4 stack at tacl: TCPIP/name $ZTC99.1 scf> start subnet * scf> exit NSK-SSH V2. our SSHD process can use this isolated stack for telnet access. ipaddress 127.ADVANCED SETUP OF SSH In this section. you need specify the following environment variable before starting the SSHD process: TCPIP_TELNET_STACK This is equal to the process name of the TCPIP stack that is isolated.TERM $ZHOME/0 2.4 Page 11 March 31. so this variable is set to: export TCPIP_TELNET_STACK=\$ztc99 To do this do the following (Note this works on all release of the Guardian OS including H-series and J-series: 1.

FILE $ZTC99 param TCPIP^PROCESS^NAME $ZTC99 param ZTNT^TRANSPORT^NAME $ZTC99 TELSERV/NAME $ZTN99.1 23 WELCOME TO test.0.bsi1.T9553D40 . 2008 .CPU 0.(15SEP2000) . Start up the TELSRV process add define =TCPIP^PROCESS^NAME.#PTYAAAA] TELSERV . to your SSHD start file and restart the SSHD servers NSK-SSH V2. Now at this point.(IPMADG) Available Services: TACL EXIT Enter Choice> If this works.NOWAIT. now you are ready to add the TCPIP_TELNET_STACK.PRI 170/23 Note that the 23 on the TELSERV command is the port to listen to.com [PORT $ZTC99 #23 WINDOW $ZTN99. you should be able to access the TELNET server locally: TELNET 127.4 Page 12 March 31.3.0.

#RANDOM-ZTC00B NSK-SSH V2. In the zzkrn subsystem.config file to listen on port the ListenAddress configuration line.vol $system This will install the subvolume $system.*.super to do this and your /etc/sshd. prngd. This is to install the files in the zzkrn subsystem.0.KERNEL SUBSYSTEM We have included in this setup the install directory the scripts for setting up the SSHD software using the standard TCPIP V4 or V6 software using the ipssh.1. to be root or super. and sshd process running as persistant processes in the ZZKRN file. scf> assume proces $zzkrn scf> volume $system.zzkrnsd The obey files adds the process service and starts up the service.4 Page 13 March 31.#IPSSH-ZTC00A $ZZKRN. you have added the following servies: $ZZKRN. What you need to do this. Now.#RANDOM-ZTC00A $ZZKRN.#IPSSH-ZTC00B $ZZKRN. is the following: cd /usr/local/ssh/install/zzkrn cp ZZKRNSD.code 100 run zzkrnsd.0. scf> scf> scf> scf> scf> scf> obey obey obey obey obey obey ranztc0a ranztc0b sdztc0a sdztc0b ipztc00a ipztc00b start start start start start start up up up up up up cpu cpu cpu cpu cpu cpu 0 1 0 1 0 1 random generator port 790 random generator port 791 sshd process port 700 sshd process port 701 ipssh1 process port 22 ipssh1 process port 22 Now check the status of the serivces scf> status They should all be running. you only need Note that you need you need to change 127.*.100 /G/system/nosubvol/ZZKRNSD gtacl>logon super.super volume /G/system/nosubvol fup alter zzkrnsd. $*.zzkrnsd on your system. 2008 .

script name $ob021 .script name $ob10 .$ZZKRN. Note that when you abort the software. When your system is started up. This script is the following: assume process $zzkrn start #RANDOM-ZTC00A start #RANDOM-ZTC00B start #SSHD-ZTC00A start #SSHD-ZTC00B start #IPSSH-ZTC00A start #IPSSH-ZTC00B For each startup script. 2008 .script name $ob001 .4 Page 14 March 31. the process running in the script does not stop.process name $RD000 #RANDOM-ZTC01 .process name $ip000 #IPSSH-ZTC00B . all you need do is the following: scf> scf> scf> scf> scf> scf> scf> assume process $zzkrn abort #IPSSH-ZTC00A abort #IPSSH-ZTC00B abort #SSHD-ZTC00A abort #SSHD-ZTC00B abort #RANDOM-ZTC00A abort #RANDOM-ZTC00B The purpose of putting the files under this subsystem is to restart the process if one every stops or a CPU dies.script name $ob11 .#SSHD-ZTC00A $ZZKRN. It is only when you restart the software.#SSHD-ZTC00B if you want to stop a service.process name $sd000 #SSHD-ZTC00B . there are two process names used.process name $ip001 NSK-SSH V2.script name $ob020 .script name $ob000 . these names are the following: #RANDOM-ZTC00 . you must have a script to start up the SSH software in the correct order or it will not start at system startup.process name $sd001 #IPSSH-ZTC00A . that process will be restarted.process name $RD001 #SSHD-ZTC00A .

This also reduces connect time when performning any action that requires a random number. Which in the case for all commands on SSH. and support for the guardian file system via sftp. This allows all TELSRV services to be stop. This port of SSH uses the tcpip access to random number generator to increase performance. Since the OSS environment does not support pty’s. We added a distributor to the release so that it is possible to support round-robin access using the standard TCPIP software and scale the ssh software and random number generator software across multiple cpus. we request access on the 127. reliablity. the sshd program will access the user’s default shell script as the standard SSH port does.0. When NSK-SSH request a pty.0.1 port 23. The major difference of this port from the standard SSH and Prngd port is how sessions are accessed and how we access the random number generator. This port of SSH and PRNGD has been fault tested to make sure that it works when a CPU fails. 2008 . all sessions are accessed using the master/slave pty configurations. We also have the ability to make this request to another TCPIP stack that is not attached to any Ethernet hardware and is only running TELSRV.4 Page 15 March 31. This port of SSH understands about ALIAS users and does it password authentication against the safeguard database. Under the standard model of SSH. We added a new command to handle remote command execution. This was not a problem in standard SSH. NSK-SSH V2. The standard SSH software does not know any thing about this. We also increase the capacity of the random number generator to handle large request loads. If you request that a pty is not allocated. we use the telnet subsystem as the pty generator. and scalability. because of problem with the select function not support the tty device. This is not a part of the standard.Porting Differences This section will talk very briefly about the differences between this port of NSKSSH and what you get would from Open Source.

2008 .4 Page 16 March 31. NSK-SSH V2.Note: This page is left blank for double sided printing.

CHECKING YOUR SESSION ACCESS VIA PC CLIENT
At this point, you have done the basic setup for the SSH software. In this section, we will be discussing how to access your system to establish session. You will need an SSH client for your PC, Mac, or Unix system to start a session. In this example we are using, MacSSH, but this will apply to Windows software too. 1. Select your host and select Secure Shell

2. Enter your user name and password:

NSK-SSH V2.4

Page 17

March 31, 2008

3. Get the system access prompt. Note that depending on what type of system, you are executing the sshd software on, it may take a while for the session to connect. This has to do with the encryption of the session.

At this point, you can access the NonStop as you always have. Just login in an start working.

NSK-SSH V2.4

Page 18

March 31, 2008

CHECKING YOUR SESSION ACCESS VIA UNIX CLIENT
If you have other unix system’s, that have SSH installed, you can access the HP NonStop using ssh. To start a session remotely on the HP NonSTop do the following: $ssh joshua@test.bsi1.com joshua’s password:
WELCOME TO test.bsi1.com [PORT $ZTC0 #23 WINDOW $ZTN0.#PTYW1DX] TELSERV - T9553D40 - (15SEP2000) - (IPMADG)

Available Services: TACL EXIT Enter Choice>

If you want to execute a remote commad, do the following: $ssh joshua@test.bsi1.com /bin/ls joshua’s password: test.pl test1.pl test2.pl test3.pl test5.pl test_message $ If you want to copy a file from the unix system to the NSK, do the following: $scp test.pl joshua@test.bsi1.com:test.pl joshua’s password:

NSK-SSH V2.4

Page 19

March 31, 2008

com /bin/gtacl joshua’s password: TACL 1> Note that you wil not beable to execute any oss commands with this tacl session because you are not using the standard telnet tty session attributes. NSK-SSH V2. do the following: $ssh joshua@test. 2008 .bsi1.4 Page 20 March 31.If you want to logon directly to TACL.

KNOWN PROBLEMS We added the scmd program to allow remote command access to a system. 2008 .4 Page 21 March 31. you should send an email message to support@bsi2. Should you find any problems with this software. This will be fixed in next release. NSK-SSH V2.com. This currently only supports commands that do not require any interaction with the user.

4 Page 22 March 31.INFORMATION If you need any help with this. Any correspondence regarding this software can be sent to the following address: Bowden Systems. 2008 .com Copyright (c) 2001-2008 Bowden Systems. please send an email message to support@bsi2. Inc.com. All Rights Reserved NSK-SSH V2. GA 30092 USA +1 866-901-9450 toll free +1 770-441-9450 direct +1 770-441-9449 fax web: www.bsi2. Suite 370 Norcross.com email:sales@bsi2. Inc. 3500 Parkway Lane.

random number generator daemon SYNOPSIS prngd [options] (/path/to/socket1 | tcp/localhost:port | tcp/ip:addr:port) [(/path/to/socket2 | tcp/localhost:port | tcp/ip:addr:port)] . keep pool in memory only -m or --mode mode use mode for sockets [0777] -k or --kill kill daemon on other side -v or --version print version and exit DESCRIPTION prngd is a daemon that provides the random number functionality on the NonStop system using either using local sockets or a tcpip port connection. 2008 .0. The option tcp/ip:addr:port allows the random number generator to liston on specified address instead of the loopback address.. System Reference Manual PRNGD(8) NSK-SSH V2.APPENDIX A .MAN PAGES prngd PRNGD(8) NAME prngd .0.1) and will use the define =TCPIP^PROCESS^NAME to get the currently defined TCPIP process stack name..4 Page 23 March 31. The default port that SSH uses for port access is 790 to 793 and the default local socket is /dev/egd-pool.conf] -s or --seedfile seedpath use seedpath as seedfile [/etc/prngd-seed] -n or --no-seedfile no seedfile. The ports 790 to 793 are against the localhost (127. OPTIONS -f or -fg do not fork -d or --debug debugging on -c or --cmdfile cmdpath use cmdpath for entropy commands [/etc/prngd.

you will still have a random number generator available on the system. If you are running P/TCPIP then you can have more than one random number generator using only port 790. most of SSH functions will not work.4 Page 24 March 31. If any one of the CPU's fail. if there is not a random number generator available. run -cpu=0 -gpri=144 run -cpu=1 -gpri=144 or run -cpu=1 -gpri=170 prngd /dev/egd-pool You could run the TCPIP random number generator port 790 on cpu 0 and port 791 or the Local Socket random number generator on cpu 1. then you can start up multiple random number generators using the same port number to spead the laod to multiple CPU's.1. As a note.STARTING DAEMON To start the prngd program using localhost port 708: prngd -gpri=144 tcp/localhost:790 To start the prngd program using tcp/ip option port 708: prngd -gpri=144 tcp/ip:192.210:790 To start the prngd program using the local socket /dev/egd-pool prngd -gpri=170 /dev/egd-pool The SSH program will attempt to use the localhost ports first and then try the local socket next. If you are using using regular TCPIP. 2008 . prngd tcp/localhost:790 prngd tcp/localhost:791 NSK-SSH V2. If you are using Parallel TCPIP with round robin. run -cpu=0 -gpri=144 prngd tcp/localhost:790 run -cpu=1 -gpri=144 prngd tcp/localhost:790 This will CPU 1 and CPU 0 the load of the random number generator. then a primary and back is good choice. You can configure one prngd program to service both tcp and local socket if you like: prngd /dev/egd-pool tcp/localhost:790 tcp/localhost:791 But you may want to configure the localhost port 790 as the primary and 791 or /dev/egd-pool as the backup.168.

Do not use /G/ directories for entropy generation. This will result in processes waiting on this information. The program also produces an EMS message when closing a connection.4 Page 25 March 31. In the directory /usr/local/random/etc there is a file call prngd-seed. it will stop generating random numbers. 2008 . This can result in system performance problems and cause the random number generator to take excessive cpu time. SSH has been program to try 5 times and then will go to the next generator viable and try 5 times also. but has been written over by the prngd program. It has been found that if prngd is not properly seed. To use this seed file: cp /usr/local/random/etc/prngd-seed /etc/prngd-seed and restart the program. NSK-SSH V2. If this fails the program executing will abend. The current seed in the /etc directory is base on this file. SEEDING DAEMON The random number generator software is locate in the /usr/local/random directory. NOTES prngd runs as a named process. This file is 1 megabyte random number that can be used a the first seed when starting prngd for the first time. prngd will not return any random information if it runs out of entropy.STOPPING DAEMON You can stop the prngd daemon with the following command: If TCPIP: prngd --kill tcp/localhost:790 If Local Socket prngd --kill /dev/egd-pool Or just use the kill command. PERFORMANCE We have notice that the random number generator using TCPIP requires less cpu overhead than one using the local sockets interface.

NSK-SSH V2. 2008 .Note: This page is left blank for double sided printing.4 Page 26 March 31.

port 700.. it is possible to distribute load to those also. (1 = .ipssh IPSSH(1) NAME IPSSH SYNOPSIS ipssh . connection rate for burst conditions. displays debuging information.. When this maximum reach all. The options are as follows: -remote port is the remote port to forward the connection.etc). This is the number of connections that can be accepted during the interval. the time is set to 1 second -maxload no -debug -wait no NSK-SSH V2. If you have more than two cpu’s.1 interface. time to wait before checking if you can bind to the port.0. -ports number is the number of ports to connect to.0.. The default is zero.g. Each port is of set by one.4 Page 27 March 31. If you have more one ipssh process on the system.702. Ipssh only forwards to the local 127. This defaults to 700. 2008 . This much like the parrallel tcpip product execpt that it will exeucte on any Nonstop system. If you enter 0. (e. The default is 5. The default is 2. Ipssh listens on port 22 and distributes its ip load to port 700 and 701. -burst rate -interval rate interval in milliseconds.701.TCPIP Multiplexer for SSH IPSSH IPSSH(1) [-remote port] [-ports no] [-burst rate] [-interval rate] [-debug] [-wait no] [-D] DESCRIPTION The ipssh programs allows you to distribute ip traffic to multiple ports on a system. The default is 30 seconds. -instance no the instance of ipssh processes. the main ipssh process wait until a child completes before continuing. this is maximumu number of ipssh processes that will be allowed exist at one time. you need to set this to number. The default is 25.01 seconds) The default is 100 or 1 sec.

NSK-SSH V2. The default is 5. you must change the define =TCPIP^PROCESS^NAME.The primary process name is /G/ISX ($ISX) and the backup process name is /G/ISY ($ISY).-qlen no number of connection to listen for on the port. so it will not fork and create a process name -D To change the default TCPIP process from $ZTC0.4 Page 28 March 31. 2008 . indicates that ipssh is to be run waited.

a new key must be generated and copied to the corresponding public key to other machines. The passphrase can be changed later by using the -p option. management and conversion SYNOPSIS ssh-keygen [-q] [-b bits] [-t type] [-N new_passphrase] [-C comment] [-f output_keyfile] ssh-keygen -p [-P old_passphrase] [-N new_passphrase] [-f keyfile] ssh-keygen -i [-f input_keyfile] ssh-keygen -e [-f input_keyfile] ssh-keygen -y [-f input_keyfile] ssh-keygen -c [-P passphrase] [-C comment] [-f keyfile] ssh-keygen -l [-f input_keyfile] ssh-keygen -B [-f input_keyfile] ssh-keygen -D reader ssh-keygen -U reader [-f input_keyfile] DESCRIPTION ssh-keygen generates.ssh/id_dsa or $HOME/. Additionally. or it may be a string of arbitrary length. There is no way to recover a lost passphrase.pub'' appended. and provides very bad passphrases). manages and converts authentication keys for ssh(1). The public key is stored in a file with the same name but ``. Normally this program generates the key and asks for a file in which to store the private key.ssh/id_rsa. The program also asks for a passphrase. The passphrase may be empty to indicate no passphrase (host keys must have an empty passphrase). Good passphrases are 10-30 characters long and are not simple sentences or otherwise easily guessable (English prose has only 1-2 bits of entropy per character. For RSA1 keys. Specifying the -t option instead creates a key for use by SSH protocol version 2. as seen in /etc/rc. 2008 . $HOME/.ssh-keygen SSH-KEYGEN(1) NAME ssh-keygen . the system administrator may use this to generate host keys. there is also a comment field in the key file that is only System Reference Manual SSH-KEYGEN(1) NSK-SSH V2.4 Page 29 March 31. Normally each user wishing to use SSH with RSA or DSA authentication runs this once to create the authentication key in $HOME/.ssh/identity.authentication key generation. If the passphrase is lost or forgotten. ssh-keygen defaults to generating a RSA1 key for use by SSH prottocol version 1.

The comment can tell what the key is for. The program will prompt for the file containing the private key. Requests changing the passphrase of a private key file instead of creating a new private key. This option allows exporting keys for use by several commercial SSH implementations. Generally 1024 bits is considered sufficient. The default is 1024 bits. and for the new comment. -i This option will read an unencrypted private (or public) key file in SSH2-compatible format and print an OpenSSH compatible private (or public) key to stdout. -l -p -q -y -t type NSK-SSH V2. The comment is initialized to ``user@host'' when the key is created. -e This option will read a private or public OpenSSH key file and print the key in a `SECSH Public Key File Format' to stdout. Silence ssh-keygen. -f filename Specifies the filename of the key file. Show fingerprint of specified private or public key file. for the passphrase if the key has one. and key sizes above that no longer improve security but make things slower. but can be changed using the -c option.for convenience to the user to help identify the key. The program will prompt for the file containing the private keys.4 Page 30 March 31. for the old passphrase. 2008 . This option will read a private OpenSSH format file and print an OpenSSH public key to stdout. The options are as follows: -b bits Specifies the number of bits in the key to create. or whatever is useful. ssh-keygen also reads the `SECSH Public Key File Format'. and twice for the new passphrase. After a key is generated. -c Requests changing the comment in the private and public key files. Minimum is 512 bits. instructions below detail where the keys should be placed to be activated. This option allows importing keys from several commercial SSH implementations. Used by /etc/rc when creating a new key.

Specifies the type of the key to create. The possible values are ``rsa1'' for protocol version 1 and ``rsa'' or ``dsa'' for protocol version 2. The default is ``rsa1''. -B Show the bubblebabble digest of specified private or public key file.

-C comment Provides the new comment. -D reader Download the RSA public key stored in the smartcard in reader. -N new_passphrase Provides the new passphrase. -P passphrase Provides the (old) passphrase. -U reader Upload an existing RSA private key into the smartcard in reader. FILES $HOME/.ssh/identity Contains the protocol version 1 RSA authentication identity of the user. This file should not be readable by anyone but the user. It is possible to specify a passphrase when generating the key; that passphrase will be used to encrypt the private part of this file using 3DES. This file is not automatically accessed by ssh-keygen but it is offered as the default file for the private key. ssh(1) will read this file when a login attempt is made. $HOME/.ssh/identity.pub Contains the protocol version 1 RSA public tion. The contents of this file should be $HOME/.ssh/authorized_keys on all machines to log in using RSA authentication. There contents of this file secret. $HOME/.ssh/id_dsa Contains the protocol version 2 DSA authentication identity of the user. This file should not be readable by anyone but the user. It is possible to specify a passphrase when generating the key; that passphrase will be used to encrypt the private part of this file using 3DES. This file is not automatically accessed by ssh-keygen but it is offered as the default file for the private key. ssh(1) will read this file when a login attempt is made.

key for authenticaadded to where the user wishes is no need to keep the

NSK-SSH V2.4

Page 31

March 31, 2008

$HOME/.ssh/id_dsa.pub Contains the protocol version 2 DSA public key for authentication. The contents of this file should be added to $HOME/.ssh/authorized_keys on all machines where the user wishes to log in using public key authentication. There is no need to keep the contents of this file secret. $HOME/.ssh/id_rsa Contains the protocol version 2 RSA authentication identity of the user. This file should not be readable by anyone but the user. It is possible to specify a passphrase when generating the key; that passphrase will be used to encrypt the private part of this file using 3DES. This file is not automatically accessed by ssh-keygen but it is offered as the default file for the private key. ssh(1) will read this file when a login attempt is made. $HOME/.ssh/id_rsa.pub Contains the protocol version 2 RSA public key for authentication. The contents of this file should be added to $HOME/.ssh/authorized_keys on all machines where the user wishes to log in using public key authentication. There is no need to keep the contents of this file secret. DEFINES SUPPORTED This program supports the TCPIP^PROCESS^NAME define. This will allow you to execute the software against other tcpip process stacks in addition to the standard process stack($ZTCO).

SEE ALSO ssh(1),

ssh-add(1),

ssh-agent(1),

sshd(8)

J. Galbraith, and R. Thayer, SECSH Public Key File Format, draft-ietfsecsh-publickeyfile-01.txt, March 2001, work in progress material.

NSK-SSH V2.4

Page 32

March 31, 2008

ssh-keyscan
SSH-KEYSCAN(1) NAME ssh-keyscan - gather ssh public keys SYNOPSIS ssh-keyscan [-v46] [-p port] [-T timeout] [-t type] [-f file] [host | addrlist namelist] [...] DESCRIPTION ssh-keyscan is a utility for gathering the public ssh host keys of a number of hosts. It was designed to aid in building and verifying ssh_known_hosts files. ssh-keyscan provides a minimal interface suitable for use by shell and perl scripts. ssh-keyscan uses non-blocking socket I/O to contact as many hosts as possible in parallel, so it is very efficient. The keys from a domain of 1,000 hosts can be collected in tens of seconds, even when some of those hosts are down or do not run ssh. For scanning, one does not need login access to the machines that are being scanned, nor does the scanning process involve any encryption. The options are as follows: -p port Port to connect to on the remote host. -T timeout Set the timeout for connection attempts. If timeout seconds have elapsed since a connection was initiated to a host or since the last time anything was read from that host, then the connection is closed and the host in question considered unavailable. Default is 5 seconds. -t type Specifies the type of the key to fetch from the scanned hosts. The possible values are ``rsa1'' for protocol version 1 and ``rsa'' or ``dsa'' for protocol version 2. Multiple values may be specified by separating them with commas. The default is ``rsa1''. -f filename Read hosts or addrlist namelist pairs from this file, one per line. If - is supplied instead of a filename, ssh-keyscan will read hosts or addrlist namelist pairs from the standard input. System Reference Manual SSH-KEYSCAN(1)

NSK-SSH V2.4

Page 33

March 31, 2008

my.-v Verbose mode. Forces ssh-keyscan to use IPv6 addresses only.1.2. Forces ssh-keyscan to use IPv4 addresses only. On the other hand.name.3.3.4.4. -4 -6 DEFINES SUPPORTED This program supports the TCPIP^PROCESS^NAME define.domain.4.ssh_known_hosts | diff ssh_known_hosts FILES Input format: 1.my. This will allow you to execute the software against other tcpip process stacks in addition to the standard process stack($ZTCO). if the security model allows such a risk. Causes ssh-keyscan to print debugging messages about its progress.2. EXAMPLES Print the rsa1 host key for machine hostname: ssh-keyscan hostname Find all hosts from the file ssh_hosts which have new or different keys from those in the sorted file ssh_known_hosts: ssh-keyscan -t rsa.1.4 Output format for rsa1 keys: host-or-namelist bits exponent modulus Output format for rsa and dsa keys: host-or-namelist keytype base64-encoded-key Where keytype is either ``ssh-rsa'' or ``ssh-dsa''.4 name.4. 2008 .n. SECURITY If a ssh_known_hosts file is constructed using ssh-keyscan without verifying the keys. ssh-keyscan can help in the detection of tampered keyfiles or man in the middle attacks which have begun after the ssh_known_hosts file was created.2. /etc/ssh/ssh_known_hosts NSK-SSH V2.domain.dsa -f ssh_hosts | \ sort -u .1. users will be vulnerable to attacks.4 Page 34 March 31.n.2.

4 Page 35 March 31.sourceforge. This is because it opens a connection to the ssh port. and Wayne Davison <wayned@users. 2008 . sshd(8) AUTHORS David Mazieres <dm@lcs. SEE ALSO ssh(1). NSK-SSH V2.net> added support for protocol version 2.mit. reads the public key.BUGS It generates "Connection closed by remote host" messages on the consoles of all the machines it scans if the server is older than version 2.edu> wrote the initial version.9. and drops the connection as soon as it gets the key.

NSK-SSH V2.4 Page 36 March 31. 2008 .Note: This page is left blank for double sided printing.

NSK-SSH SSH daemon SYNOPSIS sshd [-deiqtD46] [-b bits] [-f config_file] [-g login_grace_time] [-h host_key_file] [-k key_gen_time] [-p port] [-u len] DESCRIPTION sshd (SSH Daemon) is the daemon program for ssh(1). authentication. and provide secure encrypted communications between two untrusted hosts over an insecure network. and sends the encrypted number to the server. It encrypts this random number using both the host key and the server key. Together these programs replace rlogin and rsh. RSA challenge-response authentication.rhosts authentication combined with RSA host authentication. The programs are intended to be as easy to install and use as possible.rhosts authentication. 2008 .sshd SSHD(8) NAME sshd . This implementation of sshd supports both SSH protocol version 1 and 2 simultaneously. System Manager's Manual SSHD(8) NSK-SSH V2. and is never stored on disk. Both sides then use this random number as a session key which is used to encrypt all further communications in the session. encryption. Additionally.4 Page 37 March 31. or password based authentication. The forked daemons handle key exchange. with 3DES being used by default. The rest of the session is encrypted using a conventional cipher. when the daemon starts. SSH protocol version 1 Each host has a host-specific RSA key (normally 1024 bits) used to identify the host. Next. The client then generates a 256 bit random number. . it generates a server RSA key (normally 768 bits). the server and the client enter an authentication dialog. It is normally started at load time from /usr/local/ssh/. The client tries to authenticate itself using . Whenever a client connects the daemon responds with its public host and server keys. sshd is the daemon that listens for connections from clients. sshd works as follows. command execution. currently Blowfish or 3DES. This key is normally regenerated every hour if it has been used. and data exchange. The client compares the RSA host key against its own database to verify that it has not changed. It forks a new daemon for each incoming connection. The client selects the encryption algorithm to use from those offered by the server.

sshd can be configured using command-line options or a configuration file. However. Finally. or forwarding the authentication agent connection over the secure channel. Command execution and data forwarding If the client successfully authenticates itself. SSH protocol version 2 Version 2 works similarly: Each host has a host-specific key (RSA or DSA) used to identify the host. Blowfish. forwarding TCP/IP connections. forwarding X11 connections. SIGHUP. i. and both sides exit. At this time the client may request things like allocating a pseudo-tty.. 2008 . conventional password authentication and challenge response based methods. the client either requests a shell or execution of a command. Arcfour. either side may send data at any time.4 Page 38 March 31. CAST128. sshd rereads its configuration file when it receives a hangup signal. and such data is forwarded to/from the shell or command on the server side. The rest of the session is encrypted using a symmetric cipher. or 256 bit AES. When the user program terminates and all forwarded X11 and other connections have been closed. 3DES. In this mode.Rhosts authentication is normally disabled because it is fundamentally insecure. Command-line options override values specified in the configuration file. This key agreement results in a shared session key. The sides then enter session mode. rlogind(8). NSK-SSH V2. when the daemon starts. session integrity is provided through a cryptographic message authentication code (hmac-sha1 or hmac-md5). but can be enabled in the server configuration file if desired. System security is not improved unless rshd(8). currently 128 bit AES. and the user terminal in the client side. the server sends command exit status to the client. it does not generate a server key. /usr/local/ssh/sbin/sshd. 192 bit AES. Additionally.e. The client selects the encryption algorithm to use from those offered by the server. Protocol version 2 provides a public key based user (PubkeyAuthentication) or client host (HostbasedAuthentication) authentication method. and rexecd(8) are disabled (thus completely disabling rlogin(1) and rsh(1) into the machine). a dialog for preparing the session is entered. by executing itself with the name it was started as. Forward security is provided through a DiffieHellman key agreement.

-h host_key_file Specifies the file from which the host key is read (default /etc/ssh/ssh_host_key). It is possible to have multiple host key files for the different protocol versions and host key algorithms. A value of NSK-SSH V2. A value of zero indicates no limit.. -e -f configuration_file Specifies the name of the configuration file.The options are as follows: -b bits Specifies the number of bits in the ephemeral protocol version 1 server key (default 768). The motivation for regenerating the key fairly often is that the key is not stored anywhere. and this may take tens of seconds. This option is only intended for debugging for the server. Maximum is 3. Clients would have to wait too long if the key was regenerated every time. sshd will send the output to the standard error instead of the system log.4 Page 39 March 31. Multiple -d options increase the debugging level. the server disconnects and exits. If the client fails to authenticate the user within this many seconds. 512) using sshd from inetd may be feasible. it becomes impossible to recover the key for decrypting intercepted communications even if the machine is cracked into or physically seized. sshd refuses to start if there is no configuration file. This option must be given if sshd is not run as root (as the normal host file is normally not readable by any one but root). 2008 . -k key_gen_time Specifies how often the ephemeral protocol version 1 server key is regenerated (default 3600 seconds. with small key sizes (e. -d Debug mode. sshd is normally not run from inetd because it needs to generate the server key before it can respond to the client. -i Specifies that sshd is being run from inetd.g. and does not put itself in the background. The default is /etc/ssh/sshd_config. and after about an hour. When this option is specified. However. or one hour). The server sends verbose debug output to the system log. -g login_grace_time Gives the grace time for clients to authenticate themselves (default 600 seconds). The server also will not fork and will only process one connection.

Normally the beginning.0. -t -u len -D -4 -6 RANDOM NUMBER GENERATOR SSHD requires the use of a random number generator for its operation. Authentication mechanisms that may require DNS include RhostsAuthentication. If it does not find that. 2008 . This allows easy monitoring of sshd.4 Page 40 March 31. This is useful for updating sshd reliably as configuration options may change. Forces sshd to use IPv6 addresses only.0. This option is used to specify the size of the field in the utmp structure that holds the remote host name. Nothing is sent to the system log. -p port Specifies the port on which the server listens for connections (default 22). If the resolved host name is longer than len. TCP_RND_ADDR TCP_RND_PORT0 TCP_RND_PORT1 These environment variables allow you to change the starting and ending port and the default IP address to access for the random number generator request. the dotted decimal value will be used instead. In general. Forces sshd to use IPv4 addresses only. RhostsRSAAuthentication. -q Quiet mode. It currently looks on the ports of 790 to 793 of address 127. authentication. it then looks for the name pipe /dev/egd-pool. it fails the random number request. Only check the validity of the configuration file and sanity of the keys. Test mode. and termination of each connection is logged.1 for a random number generator. This allows hosts with very long host names that overflow this field to still be uniquely identified. Specifying -u0 indicates that only dotted decimal addresses should be put into the utmp file. If it does not find this.zero indicates that the key will never be regenerated. -u0 is also be used to prevent sshd from making DNS requests unless the authentication mechanism or configuration requires it. you need at least one NSK-SSH V2. When this option is specified sshd will not detach and does not become a daemon. HostbasedAuthentication and using a from="pattern-list" option in a key file.

4 Page 41 March 31. In our script call start_sshd_2cpu_2stack. What you need to do this. Note that you need to be root or super.generator for each TCPIP stack that SSHD is running on. This #LOOP0 is started and a TELSRV process is started against this and no listner process. you need specify the following environment variable before starting the SSHD process: TCPIP_TELNET_STACK This is equal to the process name of the TCPIP stack that is isolated. is the following: cd /usr/local/ssh/install/zzkrn cp ZZKRNSD. and sshd process running as persistant processes in the ZZKRN file.super to do this and NSK-SSH V2. $*.*. 2008 . we use the TCPIP process name $ztc99. we have a solution that allows you to do this execpt for an isolated TCPIP stack with telnet running on the loop back port. our SSHD process can use this isolated stack for telnet access.sh. If your system is heavly used for SSH request.code 100 run zzkrnsd. you only need to install the files in the zzkrn subsystem. The idea is the run the TCPIP process on your systems that is not attached to any hardware and only use the loop back port. To use this feature. then you might need more than one and you can assign the extra ones to port 791 to 793. Now.zzkrnsd on your system.*.100 /G/system/nosubvol/ZZKRNSD gtacl> <logon tacl> volume /G/system/nosubvol fup alter zzkrnsd. With this configuration.vol $system This will install the subvolume $system. so this variable is set to: export TCPIP_TELNET_STACK=\$ztc99 ZZKRN PERSISTANT PROCESS SETUP We have included in this setup the install directory the scripts for setting up the SSHD software using the standard TCPIP V4 or V6 software using the ipssh. prngd. TELNET ISOLATION For those of you that want to stop all of your telnet and ftp processes on the system.

#SSHD-ZTC00B if you want to stop a service. Lines starting with `#' and empty lines are interpreted as comments.zzkrnsd The obey files adds the process service and starts up the service.#IPSSH-ZTC00B $ZZKRN.1.you need to change your /etc/sshd.#SSHD-ZTC00A $ZZKRN. all you need do is the following: scf> scf> scf> scf> scf> scf> scf> assume process $zzkrn abort #IPSSH-ZTC00A abort #IPSSH-ZTC00B abort #SSHD-ZTC00A abort #SSHD-ZTC00B abort #RANDOM-ZTC00A abort #RANDOM-ZTC00B The purpose of putting the files under this subsystem is to restart the process if one every stops or a CPU dies. CONFIGURATION FILE sshd reads configuration data from /etc/ssh/sshd_config (or the file specified with -f on the command line).0. The file contains keywordargument pairs. This is the ListenAddress configuration line. 2008 .#IPSSH-ZTC00A $ZZKRN. scf> assume proces $zzkrn scf> volume $system.0. NSK-SSH V2. scf> scf> scf> scf> scf> scf> obey obey obey obey obey obey ranztc0a ranztc0b sdztc0a sdztc0b ipztc00a ipztc00b start start start start start start up up up up up up cpu cpu cpu cpu cpu cpu 0 1 0 1 0 1 random generator port 790 random generator port 791 sshd process port 700 sshd process port 701 ipssh1 process port 22 ipssh1 process port 22 Now check the status of the serivces scf> status They should all be running.4 Page 42 March 31. you have added the following servies: $ZZKRN.#RANDOM-ZTC00A $ZZKRN.config file to listen on port 127. In the zzkrn subsystem. one per line.#RANDOM-ZTC00B $ZZKRN.

The default is ``yes''. login is allowed only for users whose primary group or supplementary group list matches one of the patterns. Only group names are valid. Default is ``yes''. AuthorizedKeysFile Specifies the file that contains the public keys that can be used for user authentication. AllowUsers This keyword can be followed by a list of user names. By default login is allowed regardless of the group list. AuthorizedKeysFile is taken to be an absolute path or one relative to the user's home directory. This option is only available for protocol version 2. NSK-SSH V2. AllowGroups This keyword can be followed by a list of group names. Only user names are valid. After expansion. If specified.ssh/authorized_keys'' Banner In some jurisdictions. as they can always install their own forwarders. The contents of the specified file are sent to the remote user before authentication is allowed. AllowTcpForwarding Specifies whether TCP forwarding is permitted. AuthorizedKeysFile may contain tokens of the form %T which are substituted during connection set-up. separated by spaces. restricting logins to particular users from particular hosts. %h is replaced by the home directory of the user being authenticated and %u is replaced by the username of that user. `*' and `?' can be used as wildcards in the patterns. If specified. sending a warning message before authentication may be relevant for getting legal protection. Note that disabling TCP forwarding does not improve security unless users are also denied shell access. 2008 . a numerical user ID is not recognized.The possible keywords and their meanings are as follows (note that keywords are case-insensitive and arguments are case-sensitive): AFSTokenPassing Specifies whether an AFS token may be forwarded to the server. If the pattern takes the form USER@HOST then USER and HOST are separately checked. The default is ``. a numerical group ID is not recognized. By default login is allowed regardless of the user name. The following tokens are defined: %% is replaced by a literal '%'. `*' and `?' can be used as wildcards in the patterns. login is allowed only for users names that match one of the patterns. separated by spaces.4 Page 43 March 31.

If this threshold is reached while client alive messages are being sent.arcfour. Ciphers Specifies the ciphers allowed for protocol version 2. Only user names are valid. By default login is allowed regardless of the group list. and ClientAliveCountMax is left at the default. DenyGroups This keyword can be followed by a number of group names. Only group names are valid. This option applies to protocol version 2 only. Users whose primary group or supplementary group list matches one of the patterns aren't allowed to log in.conf(5) are supported. 2008 . Login is disallowed for user names that match one of the patterns. a numerical group ID is not recognized. separated by spaces. The client alive messages are sent through the encrypted channel and therefore will not be spoofable. The default is ``aes128-cbc. All authentication styles from login. The client alive mechanism is valuable when the client or server depend on knowing when a connection has become inactive. The TCP keepalive option enabled by Keepalive is spoofable. The default is 0. terminating the session. separated by spaces. sshd will disconnect the client. DenyUsers This keyword can be followed by a number of user names.3des-cbc. By default login is allowed regardless of the user NSK-SSH V2.blowfish-cbc. a numerical user ID is not recognized. The default value is 3.'' ClientAliveInterval Sets a timeout interval in seconds after which if no data has been received from the client.4 Page 44 March 31. The default is ``yes''.cast128-cbc. sshd will send a message through the encrypted channel to request a response from the client. `*' and `?' can be used as wildcards in the patterns. `*' and `?' can be used as wildcards in the patterns. ClientAliveCountMax Sets the number of client alive messages (see above) which may be sent without sshd receiving any messages back from the client.ChallengeResponseAuthentication Specifies whether challenge response authentication is allowed. unresponsive ssh clients will be disconnected after approximately 45 seconds. It is important to note that the use of client alive messages is very different from Keepalive (below). Multiple ciphers must be comma-separated. indicating that these messages will not be sent to the client. If ClientAliveInterval (above) is set to 15.

On the other hand. It is possible to have multiple host key files. The default is ``yes''. IgnoreRhosts Specifies that . thus allowing remote hosts to connect to forwarded ports. This option is similar to RhostsRSAAuthentication and applies to protocol version 2 only. The default is ``no''. ``rsa1''keys are used for version 1 and ``dsa'' or ``rsa'' are used for version 2 of the SSH protocol. The argument must be ``yes'' or ``no''. /etc/hosts.equiv and /etc/ssh/shosts. This prevents other remote hosts from connecting to forwarded ports. death of the connection or crash of one of the machines will be properly noticed. HostKey Specifies the file containing the private host keys (default /etc/ssh/ssh_host_key) used by SSH protocol versions 1 and 2.name. However. this means that connections will die if the route is down temporarily. IgnoreUserKnownHosts Specifies whether sshd should ignore the user's $HOME/. Note that sshd will refuse to use a file if it is group/world-accessible. RhostsRSAAuthentication or HostbasedAuthentication. HostbasedAuthentication Specifies whether rhosts or /etc/hosts.ssh/known_hosts during RhostsRSAAuthentication or HostbasedAuthentication. sessions may hang indefinitely on the server. if keepalives are not sent.equiv are still used.rhosts and . If they are sent. The default is ``no''. GatewayPorts Specifies whether remote hosts are allowed to connect to ports forwarded for the client. sshd binds remote port forwardings to the loopback addresss. 2008 .equiv authentication together with successful public key client host authentication is allowed (hostbased authentication). NSK-SSH V2. GatewayPorts can be used to specify that sshd should bind remote port forwardings to the wildcard address.4 Page 45 March 31. By default. leaving ``ghost'' users and consuming server resources.shosts files will not be used in RhostsAuthentication. KeepAlive Specifies whether the system should send keepalive messages to the other side. The default is ``no''. and some people find it annoying.

If the value is 0. ListenAddress Specifies the local addresses sshd should listen on. the value should be set to ``no'' in both the server and the client configuration files. Default is ``yes''. the ephemeral server key is automatically regenerated after this many seconds (if it has been used). Multiple ListenAddress options are permitted. 2008 . This can be in the form of a Kerberos ticket. sshd will listen on the address and all prior Port options specified. the server needs a Kerberos servtab which allows the verification of the KDC's identity. or if PasswordAuthentication is yes. the key is never regenerated. To use this option. KerberosOrLocalPasswd If set then if password authentication through Kerberos fails then the password will be validated via any additional local mechanism such as /etc/passwd.The default is ``yes'' (to send keepalives). The purpose of regeneration is to prevent decrypting captured sessions by later breaking into the machine and stealing the keys. Default is ``yes''. This avoids infinitely hanging sessions. Default is ``yes''. The default is to listen on all local addresses. ing forms may be used: ListenAddress host|IPv4_addr|IPv6_addr ListenAddress host|IPv4_addr:port ListenAddress [host|IPv6_addr]:port If port is not specified. KeyRegenerationInterval In protocol version 1. Ad- The follow- NSK-SSH V2.4 Page 46 March 31. Default is ``no''. The default is 3600 (seconds). KerberosTicketCleanup Specifies whether to automatically destroy the user's ticket cache file on logout. the password provided by the user will be validated through the Kerberos KDC. as this only works when the Kerberos KDC is actually an AFS kaserver. and the server will notice if the network goes down or the client host reboots. KerberosTgtPassing Specifies whether a Kerberos TGT may be forwarded to the server. The key is never stored anywhere. To disable keepalives. KerberosAuthentication Specifies whether Kerberos authentication is allowed.

Additional connections will be dropped until authentication succeeds or the LoginGraceTime expires for a connection. Multiple algorithms must be comma-separated. Alternatively. it specifies whether the server allows login to accounts with empty password strings. The default is 10.. but it will allow password authentication regardless of whether PasswordAuthentication is disabled. sshd will refuse connection attempts with a probability of ``rate/100'' (30%) if there are currently ``start'' (10) unauthenticated connections. "10:30:60"). This allows the use of most PAM challenge response authentication modules. If the value is 0.hmacsha1-96. LoginGraceTime The server disconnects after this time if the user has not successfully logged in. NSK-SSH V2.hmac-sha1. The default is ``hmac-md5. PAMAuthenticationViaKbdInt Specifies whether PAM challenge response authentication is allowed. FATAL. The default is ``no''. Logging with level DEBUG violates the privacy of users and is not recommended. LogLevel Gives the verbosity level that is used when logging messages from sshd. The de- PermitEmptyPasswords When password authentication is allowed.hmac-ripemd160. there is no time limit. fault is ``yes''. any Port options must precede this option for non port qualified addresses.g. The default is INFO. PasswordAuthentication Specifies whether password authentication is allowed.ditionally. VERBOSE and DEBUG. The default is 600 (seconds).hmac-md5-96''. MaxStartups Specifies the maximum number of concurrent unauthenticated connections to the sshd daemon. MACs Specifies the available MAC (message authentication code) algorithms. The MAC algorithm is used in protocol version 2 for data integrity protection. INFO. The default is ``no''. ERROR. The probability increases linearly and all connection attempts are refused if the number of unauthenticated connections reaches ``full'' (60).4 Page 47 March 31. The possible values are: QUIET. random early drop can be enabled by specifying the three colon separated values ``start:rate:full'' (e. 2008 .

If this option is set to ``without-password'' password authentication is disabled for root. See also ListenAddress. All other authentication methods are disabled for root. PubkeyAuthentication Specifies whether public key authentication is allowed.pid. ``forced-commands-only'' or ``no''.) Protocol The default is ``yes''. The default is /var/run/sshd.1''. The possible values are ``1'' and ``2''. The default is 22. (On some systems it is also printed by the shell.PermitRootLogin Specifies whether root can login using ssh(1). If this option is set to ``no'' root is not allowed to login. The default is ``yes''. If this option is set to ``forced-commands-only'' root login with public key authentication will be allowed. Port Specifies the port number that sshd listens on. ReverseMappingCheck Specifies whether sshd should try to verify the remote host name and check that the resolved host name for the remote IP address NSK-SSH V2. PidFile Specifies the file that contains the process identifier of the sshd daemon. but only if the command option has been specified (which may be useful for taking remote backups even if root login is normally not allowed). The default is ``yes''. The default is ``yes''. PrintMotd Specifies whether sshd should print /etc/motd when a user logs in interactively.4 Page 48 March 31. Note that this option applies to protocol version 2 only. /etc/profile. ``without-password''. Multiple versions must be commaseparated. The argument must be ``yes''. 2008 . Multiple options of this type are permitted. The default is ``2. PrintLastLog Specifies whether sshd should print the date and time when the user last logged in. or equivalent. Specifies the protocol versions sshd should support.

. RSAAuthentication Specifies whether pure RSA authentication is allowed. USER. The default is ``no''. LOCAL4. Subsystem Configures an external subsystem (e. because it performs RSA-based host authentication in addition to normal rhosts or /etc/hosts. LOCAL5. The default is AUTH. The possible values are: DAEMON.g. this method should not be permitted because it is insecure. This is normally desirable because novices sometimes accidentally leave their directory or files world-writable.4 Page 49 March 31. 2008 . The default is ``no''. and the default is 768.maps back to the very same IP address. LOCAL2. AUTH. StrictModes Specifies whether sshd should check file modes and ownership of the user's files and home directory before accepting login. RhostsRSAAuthentication should be used instead. The default is ``yes''. This option applies to protocol version 1 only. Arguments should be a subsystem name and a command to execute upon subsystem request. By default no subsystems are defined. Normally. The default is ``yes''. This option applies to protocol version 1 only. The default is ``no''.equiv authentication. ServerKeyBits Defines the number of bits in the ephemeral protocol version 1 server key. RhostsAuthentication Specifies whether authentication using rhosts or /etc/hosts. RhostsRSAAuthentication Specifies whether rhosts or /etc/hosts. Note that this option applies to protocol version 2 only. The default is ``no''. LOCAL0. file transfer daemon). LOCAL7. SyslogFacility Gives the facility code that is used when logging messages from sshd. Note that login(1) is never used NSK-SSH V2. The minimum value is 512. UseLogin Specifies whether login(1) is used for interactive login sessions. The command sftp-server(8) implements the ``sftp'' file transfer subsystem. LOCAL6. This option applies to protocol version 1 only. LOCAL3. LOCAL1.equiv authentication together with successful RSA host authentication is allowed.equiv files is sufficient.

Note also. that if this is enabled. This prevents sshd from interfering with real X11 servers. as users can always install their own forwarders. /usr/bin/X11/xauth. Note that disabling X11 forwarding does not improve security in any way. 2008 . Time Formats sshd command-line arguments and configuration file options that specify time may be expressed using a sequence of the form: time[qualifier]. Time format examples: 600 10m 1h30m 600 seconds (10 minutes) 10 minutes 1 hour 30 minutes (90 minutes) NSK-SSH V2. X11Forwarding will be disabled because login(1) does not know how to handle xauth(1) cookies. X11DisplayOffset Specifies the first display number available for sshd's X11 forwarding. The default is ``no''.4 Page 50 March 31. XAuthLocation Specifies the location of the xauth(1) program. The default is 10.for remote command execution. X11Forwarding Specifies whether X11 forwarding is permitted. where time is a positive integer value and qualifier is one of the following: <none> s | S m | M h | H d | D w | W seconds seconds minutes hours days weeks The default is Each member of the sequence is added together to calculate the total time value. X11 forwarding is automatically disabled if UseLogin is enabled.

bits. 7. Sets up basic environment. 5. prints contents and quits (unless root). Reads $HOME/.pub or the id_rsa. If $HOME/. records login time.ssh/authorized_keys is the default file that lists the public keys that are permitted for RSA authentication in protocol version 1 and for public key authentication (PubkeyAuthentication) in protocol version 2. AuthorizedKeysFile may be used to specify an alternative file. Changes to user's home directory. 8. The bits. and no command has been specified. otherwise runs xauth. modulus and comment fields give the RSA key for protocol version 1. exponent. The options fields are optional. 3. prints last login time and /etc/motd (unless prevented in the configuration file or by $HOME/. runs it. If the login is on a tty.pub. Checks /etc/nologin. You don't want to type them in. the comment field is not used for anything (but may be convenient for the user to identify the key). Each RSA public key consists of the following fields. For protocol version 2 the keytype is ``ssh-dss'' or ``ssh-rsa''. separated by spaces: options. runs it. Each line of the file contains one key (empty lines and lines starting with a `#' are ignored as comments).ssh/rc exists.4 Page 51 March 31. keytype. id_dsa. see the FILES section). sshd does the following: 1. 2008 . base64 encoded key.hushlogin. AUTHORIZED_KEYS FILE FORMAT $HOME/. if it exists. comment. Each protocol version 2 public key consists of: options. 6. 4.LOGIN PROCESS When a user successfully logs in.ssh/environment if it exists. its presence is determined by whether the line starts with a number or not (the option field never starts with a number).pub file and NSK-SSH V2. modulus. Changes to run with normal user privileges. 2. comment. instead. copy the identity. else if /etc/ssh/sshrc exists. Runs user's shell or command. If the login is on a tty. exponent. 9. Note that lines in this file are usually several hundred bytes long (because of the size of the RSA key modulus). The ``rc'' files are given the X11 authentication protocol and cookie in standard input.

command="command" Specifies that the command is executed whenever this key is used for authentication.4 Page 52 March 31. Environment variables set this way override other default environment values. the canonical name of the remote host must be present in the comma-separated list of patterns (`*' and `?' serve as wildcards). Note that this option applies to shell. however. except within double quotes. command or subsystem execution. An example might be a key that permits remote backups but nothing else. The options (if present) consist of comma-separated option specifications. The command is run on a pty if the client requests a pty. if the canonical host name matches a negated pattern. Any port forward requests by the client will return an error. No spaces are permitted.. This additional option makes using a stolen key more difficult (name servers and/or routers would have to be compromised in addition to just the key). If a 8-bit clean channel is required. The command supplied by the user (if any) is ignored. This option might be useful to restrict certain RSA keys to perform just a specific operation. the key permits an intruder to log in from anywhere in the world. environment="NAME=value" Specifies that the string is to be added to the environment when logging in using this key.edit it. one must not request a pty or should specify no-pty. otherwise it is run without a tty. in connection with the command option. e. NSK-SSH V2. Note that the client may specify TCP/IP and/or X11 forwarding unless they are explicitly prohibited. if somebody somehow steals the key. no-port-forwarding Forbids TCP/IP forwarding when this key is used for authentication. 2008 .g. This might be used. the key is not accepted. The following option specifications are supported (note that option keywords are case-insensitive): from="pattern-list" Specifies that in addition to RSA authentication. The purpose of this option is to optionally increase security: RSA authentication by itself does not trust the network or name servers or anything (but the key). A quote may be included in the command by quoting it with a backslash. The list may also contain patterns negated by prefixing them with `!'. Multiple options of this type are permitted.

Each line in these files contains the following fields: hostnames.. they must be literal domains or addresses.2334 ylo@niksula command="dump /home".ssh/known_hosts files contain host public keys for all known hosts.niksula.56:25" 1024 33 23. it is not accepted (by that line) even if it matched another pattern on the line. modulus.312314325 ylo@foo. A pattern may also be preceded by `!' to indicate negation: if the host name matches a negated pattern.niksula.. each pattern in turn is matched against the canonical host name (when authenticating a client) or against the user-supplied name (when authenticating a server). and modulus are taken directly from the RSA host key. Bits.permitopen="10.2. 2008 . e.hut... and is not used.4 Page 53 March 31. Any X11 forward requests by the client will return an error. exponent. and $HOME/. no-agent-forwarding Forbids authentication agent forwarding when this key is used for authentication.no-X11-forwarding Forbids X11 forwarding when this key is used for authentication.bar from="*.fi" 1024 35 23.55:80". comment.hut. Multiple permitopen options may be applied separated by commas..!pc.1. and the per-user file is maintained automatically: whenever the user connects from an unknown host its key is added to the per-user file.fi. no-pty Prevents tty allocation (a request to allocate a pty will fail).1.no-pty. from /etc/ssh/ssh_host_key..2323 SSH_KNOWN_HOSTS FILE FORMAT The /etc/ssh/ssh_known_hosts. bits.pub. The optional comment field continues to the end of the line.fi permitopen="10. IPv6 addresses can be specified with an alternative syntax: host/port. permitopen="host:port" Limit local ``ssh -L'' port forwarding such that it may only connect to the specified host and port... NSK-SSH V2. No pattern matching is performed on the specified hostnames. they can be obtained. Hostnames is a comma-separated list of patterns ('*' and '?' act as wildcards).no-port-forwarding 1024 33 23.. The global file should be prepared by the administrator (optional).g. exponent. Examples 1024 33 12121. The fields are separated by spaces.2323 backup.hut.2.

3 ssh-rsa AAAA1234.org. These files are created using ssh-keygen(1). generate them by a script or by taking /etc/ssh/ssh_host_key.pub. /etc/ssh/ssh_host_key.233... This will inevitably happen when short forms of host names from different domains are put in the file. These files are not really used for anything.pub These three files contain the public parts of the host keys. These files should be world-readable but writable only by root. These files should only be owned by root. authentication is accepted if valid information can be found from either file. Note that sshd does not start if this file is group/world-accessible.Lines starting with `#' and empty lines are ignored as comments..41 1024 37 159. 2008 .fi cvs..openbsd. authentication is accepted if any matching line has the proper key.. /var/run/sshd..130.137. readable only by root.199. Their contents should match the respective private parts. Examples closenet. It is thus permissible (but not recommended) to have several lines or different host keys for the same names. /etc/ssh/ssh_host_dsa_key.4 Page 54 March 31. and you definitely don't want to type in the host keys by hand. Rather... When performing host authentication. they are provided for the convenience of the user so their contents can be copied to known hosts files.185. but it is recommended (though not necessary) that it be world-readable. and not accessible to others.pub. /etc/ssh/ssh_host_rsa_key.pid Contains the process ID of the sshd listening for connections (if NSK-SSH V2..= FILES /etc/ssh/sshd_config Contains configuration data for sshd.93 closenet. /etc/ssh/ssh_host_dsa_key.. It is possible that the files contain conflicting information.pub and adding the host names at the front. This file should be writable by root only. /etc/ssh/ssh_host_rsa_key These three files contain the private parts of the host keys.hut. Note that the lines in these files are typically hundreds of characters long. /etc/ssh/ssh_host_key.208. /etc/ssh/moduli Contains Diffie-Hellman groups used for the "Diffie-Hellman Group Exchange".

This file must be readable by root (which may on some machines imply it being world-readable if the user's home directory resides on an NFS volume).4 Page 55 March 31. Users will place the contents of their identity.deny If compiled with LIBWRAP support. as described in ssh-keygen(1). this file is exactly the same as for .pub. The given user on the to log in without password. one corresponding host is permitted same file is used by rlogind and only by the user.pub files into this file. The key must be listed in one of these files to be accepted.allow. It is recommended that it not be accessible by others. $HOME/. it is recomby others.pub and/or id_rsa. 2008 . These files should be writable only by root/the owner. it can be world-readable. Either host or user name may be of the form +@groupname to specify all hosts or all users in the group. sshd refuses to let anyone except root log in. $HOME/.ssh/known_hosts These files are consulted when using rhosts with RSA host authentication or protocol version 2 hostbased authentication to check the public key of the host. The file must be writable mended that it not be accessible pairs. this contains the pid of the one started last).there are several daemons running concurrently for different ports. The client uses the same files to verify that it is connecting to the correct remote host. If is also possible to use netgroups in the file. tcp-wrappers access controls may be defined here as described in hosts_access(5). The content of this file is not sensitive. /etc/ssh/ssh_known_hosts should be world-readable. id_dsa. The format of this file is described above. /etc/nologin If this file exists.rhosts This file contains host-username per line. this file is not used by rlogin and rshd. separated by a space. $HOME/. The rshd. and non-root connections are refused. /etc/ssh/ssh_known_hosts and $HOME/. /etc/hosts. so using this permits NSK-SSH V2.shosts For ssh.ssh/known_hosts can but need not be world-readable. and $HOME/. /etc/hosts. The contents of the file are displayed to anyone trying to log in. The file should be world-readable.rhosts.ssh/authorized_keys Lists the public keys (RSA or DSA) that can be used to log into the user's account. However.

Users on those hosts are permitted to log in without a password. This file must be writable only by root. which includes bin. daemon. $HOME/. In the simplest form. If X11 spoofing is in use. such users are permitted to log in as any user on this machine (except root). The host name may also be followed by a user name. the syntax ``+@group'' can be used to specify netgroups. successful RSA host authentication is normally required. $HOME/. /etc/ssh/shosts. and assignment lines of the form name=value. one per line. The primary purpose of this file is to run any initialization routines which may be needed before the user's home directory becomes accessible. adm. it is run with /bin/sh after reading the environment files but before starting the user's shell or command. Beware that it really means that the named user(s) can log in as anybody. 2008 . this file contains host names. it is recommended that it be world-readable. provided they have the same user name on both machines.equiv.4 Page 56 March 31. AFS is a particular example of such an environ- NSK-SSH V2. Using a user name practically grants the user root access. this will receive the "proto cookie" pair in standard input (and DISPLAY in environment).access using SSH only. The file should be writable only by the user. It can only contain empty lines. Warning: It is almost never a good idea to use user names in hosts. and other accounts that own critical binaries and directories. login is automatically permitted provided the client and server user names are the same.ssh/rc If this file exists. If the client host/user is successfully matched in this file. Additionally. this file may be useful in environments that want to run both rsh/rlogin and ssh. However. Negated entries start with `-'. The only valid use for user names that I can think of is in negative entries. /etc/hosts.equiv. it need not be readable by anyone else.ssh/environment This file is read into the environment at login (if it exists). Note that this warning also applies to rsh/rlogin.equiv This file is used during . This must call xauth(1) in that case.rhosts authentication.equiv This is processed exactly as /etc/hosts. comment lines (that start with `#'). Additionally.

sftp-server(8) ssh-keygen(1). 2008 . ssh-add(1).ment. sftp(1).ssh/rc. This file will probably contain some initialization code followed by something similar to: if read proto cookie.4 Page 57 March 31. ssh(1). SEE ALSO scp(1). and should be world-readable. then echo add $DISPLAY $proto $cookie | xauth -q fi If this file does not exist. xauth is used to store the cookie. and need not be readable by anyone else. /etc/ssh/sshrc is run. and if that does not exist either. NSK-SSH V2. This can be used to specify machine-specific login-time initializations globally. /etc/ssh/sshrc Like $HOME/. This file should be writable only by root. This file should be writable only by the user. login. ssh-agent(1). moduli(5).conf(5).

NSK-SSH V2.Note: This page is left blank for double sided printing.4 Page 58 March 31. 2008 .

sftp-server is not intended to be called directly. SSH File Transfer Protocol.4 Page 59 March 31. work in progress material. DEFINES SUPPORTED This program supports the TCPIP^PROCESS^NAME define. 2008 .SFTP server subsystem SYNOPSIS sftp-server DESCRIPTION sftp-server is a program that speaks the server side of SFTP protocol to stdout and expects client requests from stdin. Ylonen. NSK-SSH V2. SEE ALSO sftp(1). sshd(8) T. System Manager's Manual SFTP-SERVER(8) ssh(1).txt. This will allow you to execute the software against other tcpip process stacks in addition to the standard process stack($ZTCO).org> HISTORY sftp-server first appeared in OpenBSD 2. Lehtinen. January 2001. See sshd(8) for more information.sftp-server SFTP-SERVER(8) NAME sftp-server . but from sshd(8) using the Subsystem option. and S. AUTHORS Markus Friedl <markus@openbsd. draft-ietf-secshfilexfer-00.8 .

Note: This page is left blank for double sided printing.4 Page 60 March 31. 2008 . NSK-SSH V2.

For example.sftp-server-guardian SFTP-SERVER(8) NAME sftp-server-guardian . work in progress material. As with all guardian filenames.SFTP server subsystem for guardian access SYNOPSIS sftp-server-guardian DESCRIPTION sftp-server-guardian is a program that speaks the server side of SFTP protocol to stdout and expects client requests from stdin. If the filename is too long you will get an error.txt.txt file on it. If the filename has a . SEE ALSO sftp(1). using the sftp-server-guardian you would use the /system/system option. 2008 . NSK-SSH V2. SSH File Transfer Protocol. This subsystem does not have access to files residing on another node. sftp-server-guardian is not intended to be called directly. but from sshd(8) using the Subsystem option. Ylonen. AUTHORS Bowden Systems Inc <sales@bsi2. and S. draft-ietf-secshfilexfer-00. there was no way to allow this via a graphical interface and unix filesystem syntax. you must limit your filenames to 8 characters.system file system. it will be stored as an edit file. Eventhough this feature was designed into the subsystem. January 2001. if you wish to access the $system. Lehtinen. sshd(8) T.com> HISTORY sftp-server-guardian first appeared in 2005. System Manager's Manual SFTP-SERVER(8) ssh(1). This make the sftp-server-guardian subsystem compatible with graphical user interfaces such as FileZilla. The sftp-server-guardian support reading and writing files directly to the guardian filesystem using the standard unix syntax. See sshd(8) for more information.4 Page 61 March 31.

4 Page 62 March 31.Note: This page is left blank for double sided printing. 2008 . NSK-SSH V2.

ENVIRONMENT VARIABLES If you need to use the SCMD program in a batch file and do not want to prompt for a password. there are two environment variables that may be set that will allow this to happen. SEE ALSO ssh(1) NSK-SSH V2. 2008 .scmd SCMD(1) System Reference Manual SCMD(1) NAME scmd .Set this to the password for the public key or user id HISTORY This program was written to solve the select problem for ssh in OSS.4 Page 63 March 31. -v used for displaying detail ssh information on stderr. it should be enclosed in double or single quotes.secure command (remote command execution) SYNOPSIS scmd [-v] user@host cmd DESCRIPTION scmd is a command front-end for ssh.Set this to indicate no password prompt GNOTTYPWD password . GNOTTY 1 . If cmd is more than one command.

NSK-SSH V2.Note: This page is left blank for double sided printing. 2008 .4 Page 64 March 31.

sftp connects and logs into the specified host. similar to ftp(1). The last usage format allows the sftp client to start in a remote directory. rename. It may also use many features of ssh. sftp will abort if any of the following commands fail: get.Secure file transfer program SYNOPSIS sftp [-1Cv] [-b batchfile] [-F ssh_config] [-o ssh_option] [-s subsystem | sftp_server] [-S program] host sftp [[user@]host[:file [file]]] sftp [[user@]host[:dir[/]]] DESCRIPTION sftp is an interactive file transfer program. put.4 Page 65 March 31. then enters an interactive command mode. -F ssh_config Specifies an alternative per-user configuration file for ssh. such as public key authentication and compression. This option is directly passed to ssh(1). otherwise it will do so after successful interactive authentication. The second usage format will retrieve files automatically if a non-interactive authentication method is used. -C Enables compression (via ssh's -C flag). The options are as follows: -1 Specify the use of protocol version 1. rm and lmkdir. 2008 . -o ssh_option Can be used to pass options to ssh in the format used in the ssh(1) configuration file. System Reference Manual SFTP(1) -b batchfile Batch mode reads a series of commands from an input batchfile instead of stdin.sftp SFTP(1) NAME sftp . This is useful for specifying options for which there is no separate sftp command-line flag. ln. which performs all operations over an encrypted ssh(1) transport. Since it lacks user interaction it should be used in conjunction with non-interactive authentication. For exam- NSK-SSH V2.

exit Quit sftp. own must be a numeric UID. there are two environment variables that may be set that will allow this to happen. Quit sftp. bye cd path Change remote directory to path.4 Page 66 March 31. A path is useful for using sftp over protocol version 1. sftp understands a set of commands similar to those of ftp(1). The ENVIRONMENT VARIABLES If you need to use the SFTP program in a batch file and do not want to prompt for a password.Set this to the password for the public key or user id INTERACTIVE COMMANDS Once in interactive mode.ple. GNOTTY 1 . chmod mode path Change permissions of file path to mode.Set this to indicate no password prompt GNOTTYPWD password . grp must be a numeric GID. to specify an alternate port use: sftp -oPort=24. -s subsystem | sftp_server Specifies the SSH2 subsystem or the path for an sftp server on the remote host. This option is also passed to ssh. or when the remote sshd does not have an sftp subsystem configured. -v Raise logging level. NSK-SSH V2. -S program Name of the program to use for the encrypted connection. program must understand ssh(1) options. 2008 . chown own path Change owner of file path to own. Commands are case insensitive and pathnames may be enclosed in quotes if they contain spaces. chgrp grp path Change group of file path to grp. lcd path Change local directory to path.

rm path NSK-SSH V2. If the remote path name is not specified. If the -P flag is specified. lmkdir path Create local directory specified by path.get [flags] remote-path [local-path] Retrieve the remote-path and store it on the local machine. put [flags] local-path [local-path] Upload local-path and store it on the remote machine. it is given the same name it has on the local machine. rename oldpath newpath Rename remote file from oldpath to newpath. lumask umask Set local umask to umask. ls [path] Display remote directory listing of either path or current directory if path is not specified. 2008 .4 Page 67 March 31. then the file's full permission and access time are copied too. mkdir path Create remote directory specified by path. help Display help text. rmdir path Remove remote directory specified by path. If the local path name is not specified. pwd quit Display remote working directory. Quit sftp. lpwd Print local working directory. lls [ls-options [path]] Display local directory listing of either path or current directory if path is not specified. it is given the same name it has on the remote machine. ln oldpath newpath Create a symbolic link from oldpath to newpath. then the file's full permission and access time are copied too. If the -P flag is specified.

and S. sshd(8) T. Lehtinen.4 Page 68 March 31. Ylonen. ssh(1).org> SEE ALSO scp(1). ssh-add(1). work in progress material. draft-ietf-secshfilexfer-00. AUTHORS Damien Miller <djm@mindrot. sftp-server(8). Synonym for help.txt. ! ? Escape to local shell. SSH File Transfer Protocol. 2008 .Delete remote file specified by path. ssh-keygen(1). January 2001. NSK-SSH V2. symlink oldpath newpath Create a symbolic link from oldpath to newpath. ! command Execute command in local shell.

Recursively copy entire directories. authentication. Any file name may contain a host and user specification to indicate that the file is to be copied to/from that host... Copies between two remote hosts are permitted. option is directly passed to ssh(1). It uses ssh(1) for data transfer.4 Page 69 March 31. System Reference Manual SCP(1) This -i identity_file Selects the file from which the identity (private key) for RSA authentication is read. Selects batch mode (prevents asking for passwords or passphrases).secure copy (remote file copy program) SYNOPSIS scp [-pqrvBC46] [-F ssh_config] [-S program] [-P port] [-c cipher] [-i identity_file] [-o ssh_option] [[user@]host1:]file1 [. Unlike rcp(1). Verbose mode.] [[user@]host2:]file2 DESCRIPTION scp copies files between hosts on a network. The options are as follows: -c cipher Selects the cipher to use for encrypting the data transfer. and modes from the original file. scp will ask for passwords or passphrases if they are needed for authentication. Disables the progress meter. -p Preserves modification times. and uses the same authentication and provides the same security as ssh(1). and configuration problems. 2008 . -r -v -B -q NSK-SSH V2.scp SCP(1) NAME scp . access times. This is helpful in debugging connection. This option is directly passed to ssh(1). Causes scp and ssh(1) to print debugging messages about their progress.

because -p is already reserved for preserving the times and modes of the file in rcp(1). there are two environment variables that may be set that will allow this to happen. GNOTTY 1 . Forces scp to use IPv6 addresses only.fi> and Tatu Ylonen <ylo@cs.Set this to the password for the public key or user id AUTHORS Timo Rinne <tri@iki.hut. The program -o ssh_option Can be used to pass options to ssh in the format used in the ssh(1) configuration file. -P port Specifies the port to connect to on the remote host. ssh-agent(1).fi> HISTORY scp is based on the rcp(1) program in BSD source code from the Regents of the University of California. SEE ALSO rcp(1). For example. This is useful for specifying options for which there is no separate scp command-line flag.4 Page 70 March 31. forcing the use of protocol version 1 is specified using scp -oProtocol=1. ssh(1). pression. -4 -6 Forces scp to use IPv4 addresses only. ssh-add(1). 2008 .-C Compression enable.Set this to indicate no password prompt GNOTTYPWD password . ENVIRONMENT VARIABLES If you need to use the SCP program in a batch file and do not want to prompt for a password. NSK-SSH V2. -S program Name of program to use for the encrypted connection. ssh-keygen(1). must understand ssh(1) options. Note that this option is written with a capital `P'. This option is directly passed to ssh(1). sshd(8) sftp(1). Passes the -C flag to ssh(1) to enable com- -F ssh_config Specifies an alternative per-user configuration file for ssh.

] ssh-add -s reader ssh-add -e reader DESCRIPTION ssh-add adds RSA or DSA identities to the authentication agent. The passphrase is read from the user's tty. removes the identity from the agent. When run without arguments. The authentication agent must be running and must be an ancestor of the current process for ssh-add to work. ssh-add retries the last passphrase if multiple identity files are given. Lists public key parameters of all identities currently represented by the agent.adds RSA or DSA identities to the authentication agent SYNOPSIS ssh-add [-lLdD] [file . Deletes all identities from the agent... 2008 . sshagent(1).4 Page 71 March 31. The options are as follows: -l Lists fingerprints of all identities currently represented by the agent. Instead of adding the identity.ssh/identity.ssh-add SSH-ADD(1) NAME ssh-add . If any file requires a passphrase. ssh-add asks for the passphrase from the user. -e reader Remove key in smartcard reader. NSK-SSH V2. it adds the file $HOME/. System Reference Manual SSH-ADD(1) -L -d -D -s reader Add key in smartcard reader. Alternative file names can be given on the command line.

it will read the passphrase from the current terminal if it was run from a terminal.ssh/id_dsa Contains the protocol version 2 DSA authentication identity of the user. sshd(8) NSK-SSH V2. ssh-agent(1). This is particularly useful when calling ssh-add from a .ssh/identity Contains the protocol version 1 RSA authentication identity of the user. $HOME/. This file should not be readable by anyone but the user. (Note that on some machines it may be necessary to redirect the input from /dev/null to make this work. 2008 . It is possible to specify a passphrase when generating the key.) SEE ALSO ssh(1). If ssh-add does not have a terminal associated with it but DISPLAY and SSH_ASKPASS are set.4 Page 72 March 31. This will allow you to execute the software against other tcpip process stacks in addition to the standard process stack($ZTCO).ssh/id_rsa Contains the protocol version 2 RSA authentication identity of the user. ssh-keygen(1). This is the default file added by ssh-add when no other files have been specified. that passphrase will be used to encrypt the private part of this file. ENVIRONMENT DISPLAY and SSH_ASKPASS If ssh-add needs a passphrase. Note that ssh-add ignores this file if it is accessible by others.Xsession or related script. it will execute the program specified by SSH_ASKPASS and open an X11 window to read the passphrase. $HOME/. DEFINES SUPPORTED This program supports the TCPIP^PROCESS^NAME define.FILES $HOME/.

2008 . This is the default if SHELL looks like it's a csh style of shell. so does the agent.. ssh-add(1) adds the $HOME/. Kill the current agent (given by the SSH_AGENT_PID environment variable). Debug mode.ssh-agent SSH-AGENT(1) NAME ssh-agent . fork.]] ssh-agent [-c | -s] -k DESCRIPTION ssh-agent is a program to hold private keys used for public key authentication (RSA. The options are as follows: -c Generate C-shell commands on stdout. NSK-SSH V2. the agent can automatically use any of these identities. this is executed as a subprocess of the agent.4 Page 73 March 31. The agent initially does not have any private keys.. It then sends the identity to the agent. When executed without arguments. This is the default if SHELL does not look like it's a csh style of shell. or from the terminal if running without X). Generate Bourne shell commands on stdout. Through use of environment variables the agent can be located and automatically used for authentication when logging in to other machines using ssh(1). The idea is that ssh-agent is started in the beginning of an X-session or a login session. and all other windows or programs are started as clients to the ssh-agent program. DSA). When this option is specified ssh-agent will not System Reference Manual SSH-AGENT(1) -s -k -d If a commandline is given.authentication agent SYNOPSIS ssh-agent [-c | -s] [-d] [command [args . If the identity has a passphrase.ssh/identity file. ssh-add(1) asks for the passphrase (using a small X11 application if running under X11. Keys are added using ssh-add(1). ssh-add -l displays the identities currently held by the agent. Several identities can be stored in the agent. When the command dies.

ssh/identity Contains the protocol version 1 RSA authentication identity of the user. and the name of this socket is stored in the SSH_AUTH_SOCK environment variable.<pid>). This will allow you to execute the software against other tcpip process stacks in addition to the standard process stack($ZTCO).ssh/id_rsa Contains the protocol version 2 RSA authentication identity of the user. However. FILES $HOME/. A unix-domain socket is created (/tmp/ssh-XXXXXXXX/agent. Authentication data need not be stored on any other machine. the connection to the agent is forwarded over SSH remote logins. This file is not used by ssh-agent but is normally added to the agent using ssh-add(1) at login time. and authentication passphrases never go over the network. DEFINES SUPPORTED This program supports the TCPIP^PROCESS^NAME define. 2008 . $HOME/. There are two main ways to get an agent setup: Either the agent starts a new subcommand into which some environment variables are exported.ssh/id_dsa Contains the protocol version 2 DSA authentication identity of the user. Later ssh(1) looks at these variables and uses them to establish a connection to the agent.4 Page 74 March 31. laptop. $HOME/. or the agent prints the needed shell commands (either sh(1) or csh(1) syntax can be generated) which can be evalled in the calling shell. The agent exits automatically when the command given on the command line terminates. It is possible to specify a passphrase when generating the key. or terminal. NSK-SSH V2. This method is easily abused by root or another instance of the same user.The idea is that the agent is run in the user's local PC. and the user can thus use the privileges given by the identities anywhere in the network in a secure way. The socket is made accessible only to the current user. This file should not be readable by anyone but the user. The SSH_AGENT_PID environment variable holds the agent's PID. that passphrase will be used to encrypt the private part of this file.

4 Page 75 March 31. SEE ALSO ssh(1). 2008 . ssh-keygen(1). The sockets should get automatically removed when the agent exits. ssh-add(1). These sockets should only be readable by the owner.<pid> Unix-domain sockets used to contain the connection to the authentication agent./tmp/ssh-XXXXXXXX/agent. sshd(8) NSK-SSH V2.

4 Page 76 March 31. 2008 .Note: This page is left blank for double sided printing. NSK-SSH V2.

Second. if the machine the user logs in from is listed in /etc/hosts.shosts.4 Page 77 March 31. 2008 . and provide secure encrypted communications between two untrusted hosts over an insecure network. and if additionally the server can verify the client's host key (see /etc/ssh/ssh_known_hosts and $HOME/. $HOME/. if . [Note to the administrator: /etc/hosts. and the rlogin/rsh protocol in general. /etc/hosts. the user is immediately permitted to log in.rhosts.equiv on the remote machine. It means that if the login would be permitted by $HOME/. or /etc/ssh/shosts. the user is permitted to log in. X11 connections and arbitrary TCP/IP ports can also be forwarded over the secure channel.equiv. The second authentication method is the rhosts or hosts.NSK SSH client (remote login program) SYNOPSIS ssh [-l login_name] hostname | user@hostname [command] ssh [-afgknqstvxACNPTX1246] [-b bind_address] [-c cipher_spec] [-e escape_char] [-i identity_file] [-l login_name] [-m mac_spec] [-o option] [-p port] [-F configfile] [-L port:host:hostport] [-R port:host:hostport] [-D port] hostname | user@hostname [command] DESCRIPTION ssh (SSH client) is a program for logging into a remote machine and for executing commands on a remote machine.equiv method combined with RSA-based host authentication.equiv. only then login is permitted. This authentication method closes security holes due to IP spoofing. are inherently insecure and should be System Reference Manual SSH(1) NSK-SSH V2.ssh/known_hosts in the FILES section).rhosts or . The user must prove his/her identity to the remote machine using one of several methods deM-pending on the protocol version used: SSH protocol version 1 First. ssh connects and logs into the specified hostname.ssh SSH(1) NAME ssh .equiv.equiv or /etc/ssh/shosts. $HOME/.rhosts.shosts exists in the user's home directory on the remote machine and contains a line containing the name of the client machine and the name of the user on that machine. It is intended to replace rlogin and rsh. DNS spoofing and routing spoofing. This form of authentication alone is normally not allowed by the server because it is not secure. and the user names are the same on both sides.

This stores the private key in $HOME/.ssh/authorized_keys lists the public keys that are permitted for logging in. The public key method is similar to RSA authentication described in the NSK-SSH V2. the client will try to authenticate first using the hostbased method. and only the user knows the private key. sends the user (actually the ssh program running on behalf of the user) a challenge.pub to $HOME/. The file $HOME/. The user creates his/her RSA key pair by running ssh-keygen(1). Using the default values for PreferredAuthentications. RSA authentication is much more secure than rhosts authentication.ssh/identity and the public key in $HOME/. ssh prompts the user for a password. The user should then copy the identity.rhosts file. if this method fails public key authentication is attempted. and if so.disabled if security is desired. and it is not possible to derive the decryption key from the encryption key. See ssh-agent(1) for more information. the password cannot be seen by someone listening on the network.] As a third authentication method. The scheme is based on public-key cryptography: there are cryptosystems where encryption and decryption are done using separate keys. since all communications are encrypted. If other authentication methods fail. the ssh program tells the server which key pair it would like to use for authentication. The most convenient way to use RSA authentication may be with an authentication agent. ssh supports RSA based authentication. RSA is one such system. and finally if this method fails keyboard-interactive and password authentication are tried. The idea is that each user creates a public/private key pair for authentication purposes.pub in the user's home directory. The password is sent to the remote host for checking. the user can log in without giving the password. The server checks if this key is permitted. The user's client then decrypts the challenge using the private key. and has one key per line. a random number. proving that he/she knows the private key but without disclosing it to the server. The server knows the public key. SSH protocol version 2 When a user connects using the protocol version 2 different authentication methods are available.ssh/authorized_keys in his/her home directory on the remote machine (the authorized_keys file corresponds to the conventional $HOME/.ssh/identity. After this. encrypted by the user's public key. though the lines can be very long). however. ssh implements the RSA authentication protocol automatically.4 Page 78 March 31. When the user logs in. 2008 . The challenge can only be decrypted using the proper private key.

Note that protocol 1 lacks a strong mechanism for ensuring the integrity of the connection. If public key authentication fails or is not available a password can be sent encrypted to the remote host for proving the user's identity.ssh/id_rsa. The escape character must always follow a newline to be interpreted as special. The escape character can be changed in configuration files using the EscapeChar configuration directive or on the command line by the -e option.ssh/id_dsa or $HOME/. The exit status of the remote program is returned as the exit status of ssh. The server checks whether the matching public key is listed in $HOME/. $HOME/. to sign the session identifier and sends the result to the server. or logs into the machine and gives the user a normal shell on the remote machine. hmac-sha1). Additionally. ssh supports hostbased or challenge response authentication. setting the escape character to ``none'' will also make the session transparent even if a tty is used. 2008 . A single tilde character can be sent as ~~ or by following the tilde by a character other than those described below. The session identifier is derived from a shared Diffie-Hellman value and is only known to the client and the server. If a pseudo-terminal has been allocated (normal login session).ssh/authorized_keys and grants access if both the key is found and the signature is correct. CAST128 or Arcfour) and integrity (hmac-md5. ssh supports a number of functions through the use of an escape character.4 Page 79 March 31.previous section and allows the RSA or DSA algorithm to be used: The client uses his private key. the server either executes the given command. the session is transparent and can be used to reliably transfer binary data. NSK-SSH V2. If no pseudo tty has been allocated. The session terminates when the command or shell on the remote machine exits and all X11 and TCP/IP connections have been closed. All communication with the remote command or shell will be automatically encrypted. the user may use the escape characters noted below. Escape Characters When a pseudo terminal has been requested. Protocol 2 provides additional mechanisms for confidentiality (the traffic is encrypted using 3DES. On most systems. Blowfish. Login session and remote execution When the user's identity has been accepted by the server.

Forwarding of X11 connections can be configured on the command line or in configuration files. NSK-SSH V2. Forwarding of arbitrary TCP/IP connections over the secure channel can be specified either on the command line or in a configuration file.The supported escapes (assuming the default `~') are: ~. One possible application of TCP/IP forwarding is a secure connection to an electronic purse. For this purpose. the connection to the agent is automatically forwarded to the remote side unless disabled on the command line or in a configuration file. the connection to the X11 display is automatically forwarded to the remote side in such a way that any X11 programs started from the shell (or command) will go through the encrypted channel. and the connection to the real X server will be made from the local machine. The user should not manually set DISPLAY. The real authentication cookie is never sent to the server machine (and no cookies are sent in the plain). ssh will also automatically set up Xauthority data on the server machine. store it in Xauthority on the server. it will generate a random authorization cookie. another is going through firewalls. The DISPLAY value set by ssh will point to the server machine. but with a display number greater than zero.4 Page 80 March 31. see the description of the -X and -x options described later) and the user is using X11 (the DISPLAY environment variable is set). If the user is using an authentication agent. and happens because ssh creates a ``proxy'' X server on the server machine for forwarding the connections over the encrypted channel. This is normal. and verify that any forwarded connections carry this cookie and replace it by the real cookie when the connection is opened. 2008 . ~^Z ~# ~& Disconnect Background ssh List forwarded connections Background ssh at logout when waiting for forwarded connection / X11 sessions to terminate (protocol version 1 only) Display a list of escape characters Request rekeying of the connection (only useful for SSH protocol version 2 and if the peer supports it) ~? ~R X11 and TCP forwarding If the ForwardX11 variable is set to ``yes'' (or.

the file /etc/ssh/ssh_known_hosts is automatically checked for known hosts.') closes the connection. ssh warns about this and disables password authentication to prevent a trojan horse from getting the user's password. -e ch|^ch|none Sets the escape character for sessions with a pty (default: `~'). Host keys are stored in $HOME/. The StrictHostKeyChecking option (see below) can be used to prevent logins to machines whose host key is not known or has changed. -c cipher_spec Additionally. and followed by itself sends the escape character once. 2008 . Its use is strongly discouraged due to cryptographic weaknesses. it appears very secure and is much faster than 3des. The escape character followed by a dot (`. Enables forwarding of the authentication agent connection. Additionally. This can also be specified on a per-host basis in a configuration file. blowfish is a fast block cipher. -b bind_address Specify the interface to transmit from on machines with multiple interfaces or aliased addresses. 3des is used by default. The escape character is only recognized at the beginning of a line. -c blowfish|3des|des Selects the cipher to use for encrypting the session. See Ciphers for more information. followed by control-Z suspends the connection.ssh/known_hosts in the user's home directory. Any new hosts are automatically added to the user's file. 3des (triple-des) is an encrypt-decrypt-encrypt triple with three different keys. If a host's identification ever changes. Setting the NSK-SSH V2. for protocol version 2 a comma-separated list of ciphers can be specified in order of preference. It is believed to be secure.Server authentication ssh automatically maintains and checks a database containing identifications for all hosts it has ever been used with. des is only supported in the ssh client for interoperability with legacy protocol 1 implementations that do not support the 3des cipher. Another purpose of this mechanism is to prevent man-in-the-middle attacks which could otherwise be used to circumvent the encryption. The options are as follows: -a -A Disables forwarding of the authentication agent connection.4 Page 81 March 31.

The argument is the device ssh should use to communicate with a smartcard used for storing the user's private RSA key. -n Redirects stdin from /dev/null (actually. -g -i identity_file Selects the file from which the identity (private key) for RSA or DSA authentication is read. The ssh program will be put in the background.) Do not execute a remote command. -k Disables forwarding of Kerberos tickets and AFS tokens.hut. This may also be specified on a per-host basis in the configuration file. and the X11 connection will be automatically forwarded over an encrypted channel. For example. It is possible to have multiple -i options (and multiple identities specified in configuration files). -N NSK-SSH V2. -l login_name Specifies the user to log in as on the remote machine. -I smartcard_device Specifies which smartcard device to use. prevents reading from stdin).hut. This is useful if ssh is going to ask for passwords or passphrases. Default is $HOME/. 2008 . but the user wants it in the background. This also may be specified on a per-host basis in the configuration file.cs.character to ``none'' disables any escapes and makes the session fully transparent. Identity files may also be specified on a per-host basis in the configuration file.ssh/identity in the user's home directory. This is useful for just forwarding ports (protocol version 2 only).fi emacs & will start an emacs on shadows. (This does not work if ssh needs to ask for a password or passphrase. see also the -f option. See the MACs keyword for more information. for protocol version 2 a comma-separated list of MAC (message authentication code) algorithms can be specified in order of preference. This implies -n. A common trick is to use this to run X11 programs on a remote machine.fi. -f Requests ssh to go to background just before command execution. -m mac_spec Additionally.4 Page 82 March 31. ssh -n shadows. The recommended way to start X11 programs at a remote site is with something like ssh -f host xterm. This must be used when ssh is run in the background.cs. Allows remote hosts to connect to local forwarded ports.

when implementing menu services.4 Page 83 March 31. Compression is desirable on modem lines and other slow connections. The default value can be set on a host-by-host basis in the con- NSK-SSH V2. Causes all warning and diagnostic messages to be Only fatal errors are displayed. This can be used if a firewall does not permit connections from privileged ports. authentication. and the ``level'' can be controlled by the CompressionLevel option (see below). 2008 . Multiple -v options increases the verbosity. This can be specified on a per-host basis in the configuration file. even if ssh has no local tty. but will only slow down things on fast networks. -P Use a non-privileged port for outgoing connections. This can be used to execute arbiM-trary screen-based programs on a remote machine. -p port Port to connect to on the remote host..-o option Can be used to give options in the format used in the configuration file. Force pseudo-tty allocation. Note that this option turns off RhostsAuthentication and RhostsRSAAuthentication for older servers. Verbose mode. Quiet mode. This is useful for specifying options for which there is no separate command-line flag. sftp). stdout. which can be very useful. This can also be specified on a per-host -t -T -v -x -X basis in a configuration file. Enables X11 forwarding. Causes ssh to print debugging messages about its progress. stderr. and data for forwarded X11 and TCP/IP connections). -C Requests compression of all data (including stdin. e. -q -s May be used to request invocation of a subsystem on the remote system.g. suppressed. and configuration problems. Disable pseudo-tty allocation. This is helpful in debugging connection. The subsystem is specified as the remote command. Subsystems are a feature of the SSH2 protocol which facilitate the use of SSH as a secure transport for other applications (eg. The compression algorithm is the same used by gzip(1). Maximum is 3. Multiple -t options force tty allocation. Disables X11 forwarding.

IPv6 addresses can be specified with an alternative syntax: port/host/hostport -R port:host:hostport Specifies that the given port on the remote (server) host is to be forwarded to the given host and port on the local side. Dynamic port forwardings can also be specified in the configuration file. -F configfile Specifies an alternative per-user configuration file. Only root can forward priviM-leged ports. -1 -2 -4 Forces ssh to try protocol version 1 only. This works by allocating a socket to listen to port on the local side.figuration files. and whenever a connection is made to this port. -L port:host:hostport Specifies that the given port on the local (client) host is to be forwarded to the given host and port on the remote side. and a connection is made to host port hostport from the local machine. the system-wide configuration file (/etc/ssh/ssh_config) will be ignored. Forces ssh to try protocol version 2 only. and the application protocol is then used to determine where to connect to from the remote machine. Currently the SOCKS4 protocol is supported. NSK-SSH V2. the connection is forwarded over the secure channel. This works by allocating a socket to listen to port on the remote side. Port forwardings can also be specified in the configuration file. IPv6 addresses can be specified with an alternative syntax: port/host/hostport -D port Specifies a local ``dynamic'' application-level port forwarding. the connection is forwarded over the secure channel. and ssh will act as a SOCKS4 server. and whenever a connection is made to this port. and whenever a connection is made to this port.4 Page 84 March 31. If a configuration file is given on the command line. see the Compression option below. Forces ssh to use IPv4 addresses only. This works by allocating a socket to listen to port on the local side. The default for the per-user configuration file is $HOME/. the connection is forwarded over the secure channel. Port forwardings can also be specified in the configuration file.ssh/config. 2008 . Only root can forward privileged ports. and a connection is made to host port hostport from the remote machine. Privileged ports can be forwarded only when logging in as root on the remote machine.

and general defaults at the end.ssh/config). scp and sftp -o option. and that section is only applied for hosts that match one of the patterns given in the specification. CONFIGURATION FILES ssh obtains configuration data from the following sources in the following order: command line options. Configuration options may be separated by whitespace or optional whitespace and exactly one `='. more host-specific declarations should be given near the beginning of the file. NSK-SSH V2.4 Page 85 March 31. The configuration file has the following format: Empty lines and lines starting with `#' are comments. A single `*' as a pattern can be used to provide global defaults for all hosts. Otherwise a line is of the format ``keyword arguments''. 2008 . The argument must be ``yes'' or ``no''.. This option applies to protocol version 1 only.e. BatchMode If set to ``yes''. user's configuration file ($HOME/. This option is useful in scripts and other batch jobs where no user is present to supply the password. The possible keywords and their meanings are as follows (note that keywords are case-insensitive and arguments are case-sensitive): Host Restricts the following declarations (up to the next Host keyword) to be only for those hosts that match one of the patterns given after the keyword. AFSTokenPassing Specifies whether to pass AFS tokens to remote host. Since the first obtained value for each parameter is used. The configuration files contain sections bracketed by ``Host'' specifications. The argument to this keyword must be ``yes'' or ``no''. The host is the hostname argument given on the command line (i. `*' and `?' can be used as wildcards in the patterns. For each parameter.-6 Forces ssh to use IPv6 addresses only. The matched host name is the one given on the command line. and system-wide configuration file (/etc/ssh/ssh_config). passphrase/password querying will be disabled. the name is not converted to a canonicalized host name before matching). the first obtained value will be used. the latter format is useful to avoid the need to quote whitespace when specifying configuration options using the ssh. The default is ``no''.

ConnectionAttempts Specifies the number of tries (one per second) to make before NSK-SSH V2.arcfour. and is automatically set by scp(1) and sftp(1). The default is ``yes''. Its use is strongly discouraged due to cryptographic weaknesses. The meaning of the values is the same as in gzip(1). and ``des'' are supported. 2008 .BindAddress Specify the interface to transmit from on machines with multiple interfaces or aliased addresses. best). ``blowfish''. aes192-cbc.4 Page 86 March 31. ssh will additionally check the host IP address in the known_hosts file.blowfish-cbc. This allows ssh to detect if a host key changed due to DNS spoofing. Multiple ciphers must be comma-separated. remote and dynamic port forwardings specified in the configuration files or on the command line be cleared. the check will not be executed. The argument must be an integer from 1 (fast) to 9 (slow. Currently. The default is ``3des''. des is only supported in the ssh client for inM-teroperability with legacy protocol 1 implementations that do not support the 3des cipher. Note that this option applies to protocol version 1 only. The argument must be ``yes'' or ``no''. The default level is 6. The argument must be ``yes'' or ``no''. CompressionLevel Specifies the compression level to use if compression is enabled.aes256-cbc'' ClearAllForwardings Specifies that all local. The default is ``no''. This option is primarily useful when used from the ssh command line to clear port forwardings set in configuration files. The default is ``no''.cast128-cbc. ``3des''. Cipher Specifies the cipher to use for encrypting the session in protocol version 1. CheckHostIP If this flag is set to ``yes''. Note that this option does not work if UsePrivilegedPort is set to ``yes''. which is good for most applications. Compression Specifies whether to use compression. Ciphers Specifies the ciphers allowed for protocol version 2 in order of preference. The deM-fault is ``aes128-cbc.3des-cbc. If the option is set to ``no''.

The argument must be ``yes'' or ``no''. or ``none'' to disable the escape character entirely (making the connection transparent for binary data). The default is 1. The default is ``no''. GatewayPorts Specifies whether remote hosts are allowed to connect to local forwarded ports. EscapeChar Sets the escape character (default: `~'). The argument must be ``yes'' or ``no''. This prevents other remote hosts from connecting to forwarded ports. This may be useful in scripts if the connection sometimes fails. The argument must be a port number. GlobalKnownHostsFile NSK-SSH V2. thus allowing remote hosts to connect to forwarded ports. ssh binds local port forwardings to the loopback addresss. FallBackToRsh Specifies that if connecting via ssh fails due to a connection refused error (there is no sshd(8) listening on the remote host).falling back to rsh or exiting. The argument should be a single character. The argument must be ``yes'' or ``no''. DynamicForward Specifies that a TCP/IP port on the local machine be forwarded over the secure channel. The default is ``no''. The escape character can also be set on the command line. ForwardAgent Specifies whether the connection to the authentication agent (if any) will be forwarded to the remote machine. ForwardX11 Specifies whether X11 connections will be automatically redirected over the secure channel and DISPLAY set. 2008 . The argument must be an integer. The default is ``no''. Currently the SOCKS4 protocol is supported. `^' followed by a letter. Multiple forwardings may be specified. and the application protocol is then used to determine where to connect to from the remote machine. The default is ``no''. and ssh will act as a SOCKS4 server. By default. The argument must be ``yes'' or ``no''.4 Page 87 March 31. and additional forwardings can be given on the command line. GatewayPorts can be used to specify that ssh should bind local port forwardings to the wildcard address. rsh(1) should automatically be used instead (after a suitable warning about the session being unencrypted). Only the superuser can forward privileged ports.

The default is ``no''. Additionally. any identities represented by the authentication agent will be used for authentication.4 Page 88 March 31. This can be used to specify nicknames or abbreviations for hosts. this means that connections will die if the route is down temporarily. HostbasedAuthentication Specifies whether to try rhosts based authentication with public key authentication. This is important in scripts. all these identities will be tried in sequence. HostName Specifies the real host name to log into. However.ssh-dss'' HostKeyAlias Specifies an alias that should be used instead of the real host name when looking up or saving the host key in the host key database files. IdentityFile Specifies the file from which the user's RSA or DSA authentication identity is read (default $HOME/. If they are sent. death of the connection or crash of one of the machines will be properly noticed. The default is ``yes'' (to send keepalives).Specifies a file to use for the global host key database instead of /etc/ssh/ssh_known_hosts. It is possible to have multiple identity files specified in configuration files.ssh/identity in the user's home directory). KeepAlive Specifies whether the system should send keepalive messages to the other side. the value should be set to ``no'' in both NSK-SSH V2. To disable keepalives. This option is useful for tunneling ssh connections or for multiple servers running on a single host. and the client will notice if the network goes down or the remote host dies. Default is the name given on the command line. HostKeyAlgorithms Specifies the protocol version 2 host key algorithms that the client wants to use in order of preference. The default for this option is: ``ssh-rsa. The file name may use the tilde syntax to refer to a user's home directory. Numeric IP addresses are also permitted (both on the command line and in HostName specifications). and many users want it too. This option applies to protocol version 2 only and is similar to RhostsRSAAuthentication. The argument must be ``yes'' or ``no''. and some people find it annoying. 2008 .

NumberOfPasswordPrompts Specifies the number of password prompts before giving up. The default is INFO. Only the superuser can forward privileged ports. 2008 . Multiple algorithms must be comma-separated. and the second must be host:port. The argument to this keyword must be an integer. gument to this keyword must be ``yes'' or ``no''. INFO.hmac-sha1-96.hmac-sha1. Default is 3. MACs Specifies the MAC (message authentication code) algorithms in order of preference. and additional forwardings can be given on the command line.the server and the client configuration files. The ar- KerberosTgtPassing Specifies whether a Kerberos TGT will be forwarded to the server. Default PreferredAuthentications Specifies the order in which the client should try protocol 2 authentication methods.hmac-md5-96''. The first argument must be a port number.hmacripemd160. This will only work if the Kerberos server is actually an AFS kaserver. FATAL. Port Specifies the port number to connect on the remote host. IPv6 addresses can be specified with an alternative syntax: host/port. The MAC algorithm is used in protocol version 2 for data integrity protection. PasswordAuthentication Specifies whether to use password authentication. The possible values are: QUIET. This allows a client to prefer one method NSK-SSH V2. VERBOSE and DEBUG. The default is ``yes''. KerberosAuthentication Specifies whether Kerberos authentication will be used. LocalForward Specifies that a TCP/IP port on the local machine be forwarded over the secure channel to the specified host and port from the remote machine.4 Page 89 March 31. The default is ``hmac-md5. is 22. ERROR. The argument to this keyword must be ``yes'' or ``no''. The argument to this keyword must be ``yes'' or ``no''. LogLevel Gives the verbosity level that is used when logging messages from ssh. Multiple forwardings may be specified.

This option applies to protocol version 2 only.publickey. The possible values are ``1'' and ``2''. The argument to this keyword must be ``yes'' or ``no''. and is executed with /bin/sh. PubkeyAuthentication Specifies whether to try public key authentication.(e. or execute sshd -i somewhere. RhostsAuthentication Specifies whether to try rhosts based authentication. The default is ``2. Note that this declaration only affects the client side and has no effect whatsoever on security. 2008 . Disabling rhosts authentication may reduce authentication time on slow connections when rhosts authentication is not used. IPv6 addresses can be specified with an alternative syntax: host/port. The argument to this keyword must be ``yes'' or ``no''. and the second must be host:port. Multiple versions must be comma-separated. The deM-fault is ``yes''.g. The command can be basically anything. Multiple forwardings may be specified. password) The default for this option is: ``hostbased. `%h' will be substituted by the host name to connect and `%p' by the port. This means that ssh tries version 2 and falls back to version 1 if version 2 is not available. The command string extends to the end of the line. This option applies to protocol version 1 only. ProxyCommand Specifies the command to use to connect to the server.4 Page 90 March 31.keyboardinteractive. and should read from its standard input and write to its standard output.1''. The first argument must be a port number. The default is ``yes''. In the command string. RemoteForward Specifies that a TCP/IP port on the remote machine be forwarded over the secure channel to the specified host and port from the local machine. It should eventually connect an sshd(8) server running on some machine. Only the superuser can forward privileged ports. NSK-SSH V2. keyboard-interactive) over another method (e. Note that CheckHostIP is not available for connects with a proxy command. Host key management will be done using the HostName of the host being connected (defaulting to the name typed by the user). and additional forwardings can be given on the command line. Most servers do not permit RhostsAuthentication because it is not secure (see RhostsRSAAuthentication).password'' Protocol Specifies the protocol versions ssh should support in order of preference.g.

Note that this option applies to protocol version 1 only. If this flag is set to ``ask''. however. If this flag is set to ``no''. new host keys will be added to the user known host files only after the user has confirmed that is what they really want to do. This option forces the user to manually add all new hosts. The argument must be ``yes''. The default is ``ask''. The host keys of known hosts will be verified automatically in all cases. The default is ``yes''. ssh will never automatically add host keys to the $HOME/. 2008 . and refuses to connect to hosts whose host key has changed. The default is ``yes''. SmartcardDevice Specifies which smartcard device to use. By default.ssh/known_hosts file. The default is ``no''. StrictHostKeyChecking If this flag is set to ``yes''. Note that this option must be set to ``yes'' if RhostsAuthentication and RhostsRSAAuthentication authentications are needed with older servers. The default is ``yes''. NSK-SSH V2. RSAAuthentication Specifies whether to try RSA authentication.RhostsRSAAuthentication Specifies whether to try rhosts based authentication with RSA host authentication. ``no'' or ``ask''. The argument must be ``yes'' or ``no''. RSA authentication will only be attempted if the identity file exists. ChallengeResponseAuthentication Specifies whether to use challenge response authentication. no device is specified and smartcard support is not activated. or connections to new hosts are frequently made. The argument must be ``yes'' or ``no''. This option applies to protocol version 1 only. This provides maximum protection against trojan horse attacks.4 Page 91 March 31. The argument to this keyword is the device ssh should use to communicate with a smartcard used for storing the user's private RSA key. or an authentication agent is running. The argument to this keyword must be ``yes'' or ``no''. The argument to this keyword must be ``yes'' or ``no''. UsePrivilegedPort Specifies whether to use a privileged port for outgoing connections. can be annoying when the /etc/ssh/ssh_known_hosts file is poorly maintained. ssh will automatically add new host keys to the user known hosts files. and ssh will refuse to connect to hosts whose host key has changed.

/usr/bin/X11/xauth. This can be useful when a different user name is used on different machines. MAIL PATH Set to the path of the user's mailbox. The user should normally not set DISPLAY explicitly. 2008 . Set to the default PATH. All other options (except HostName) are ignored if this has been specified.ssh/known_hosts. This causes ssh to immediately execute rsh(1). The default is ENVIRONMENT ssh will normally set the following environment variables: DISPLAY The DISPLAY variable indicates the location of the X11 server. it will read the passphrase from the current terminal if it was run from a terminal. as specified when compiling ssh. This saves the trouble of having to remember to give the user name on the command line. Set to the path of the user's home directory.Xsession or related script. it will execute the program specified by SSH_ASKPASS and open an X11 window to read the passphrase.User Specifies the user to log in as. It is automatically set by ssh to point to a value of the form ``hostname:n'' where hostname indicates the host where the shell runs. ssh uses this special value to forward X11 connections over the secure channel. HOME LOGNAME Synonym for USER. It is possible that the host does not at all support the ssh protocol. SSH_ASKPASS If ssh needs a passphrase. If ssh does not have a terminal associated with it but DISPLAY and SSH_ASKPASS are set. and n is an integer >= 1.4 Page 92 March 31. UserKnownHostsFile Specifies a file to use for the user host key database instead of $HOME/. set for compatibility with systems that use this variable. XAuthLocation Specifies the location of the xauth(1) program. UseRsh Specifies that rlogin/rsh should be used for this host. This is particularly useful when calling ssh from a . The argument must be ``yes'' or ``no''. as that will render the X11 connection insecure (and will require the user to manually copy any required authorization cookies). NSK-SSH V2.

protocol 2 DSA. $HOME/.ssh/id_rsa Contains the authentication identity of the user. SSH_CLIENT Identifies the client end of the connection. respectively. client port number.4 Page 93 March 31. GNOTTY 1 . $HOME/. the daemon passes the value on to new connections).) SSH_AUTH_SOCK Identifies the path of a unix-domain socket used to communicate with the agent. Set to the name of the user logging in. and adds lines of the format ``VARNAME=value'' to the environment.e.(Note that on some machines it may be necessary to redirect the input from /dev/null to make this work. this variable is not set.ssh/id_dsa.. If the current session has no tty. The variable contains three space-separated values: client ip-address. They are for protocol 1 RSA. and protocol 2 RSA. SSH_ORIGINAL_COMMAND The variable contains the original command line if a forced command is executed.Set this to the password for the public key or user id FILES $HOME/.Set this to indicate no password prompt GNOTTYPWD password . TZ The timezone variable is set to indicate the present timezone if it was set when the daemon was started (i. NONSTOP ADDITIONAL OPTIONS If you need to use the SSH program in a batch file and do not want to prompt for a password. NSK-SSH V2. 2008 . and server port number. there are two environment variables that may be set that will allow this to happen. SSH_TTY This is set to the name of the tty (path to the device) associated with the current shell or command. It can be used to extract the original arguments. $HOME/. ssh reads $HOME/.ssh/identity.ssh/known_hosts Records host keys for all hosts the user has logged into that are not in /etc/ssh/ssh_known_hosts. USER Additionally. See sshd(8).ssh/environment.

This file should be prepared by the system administrator to contain the public host keys of all machines in the organization. The contents of the $HOME/.ssh/identity.pub and $HOME/.pub. they are only provided for the convenience of the user. The format of this file is described above. $HOME/. These files are never used automatically and are not necessary. The canonical system name (as returned by name servers) is used by sshd(8) to verify the client host when logging in. but the recommended permissions are read/write for the user. 2008 . public key and optional comment field.4 Page 94 March 31.ssh/id_dsa. other names NSK-SSH V2. $HOME/.ssh/id_rsa.pub file should be added to $HOME/.pub Contains the public key for authentication (public part of the identity file in human-readable form). This file is not highly sensitive. /etc/ssh/ssh_known_hosts Systemwide list of known host keys.These files contain sensitive data and should be readable by the user but not accessible by others (read/write/execute).ssh/id_rsa. It is possible to specify a passphrase when generating the key.ssh/identity. and not accessible by others. one per line. in the following format (fields separated by spaces): system name. $HOME/.pub file should be added to $HOME/.pub identity files. but the recommended permissions are read/write for the user. all such names should be listed. This file does not usually contain any sensitive information. and not accessible by others. This file contains public keys. Note that ssh ignores a private key file if it is accessible by othM-ers. This file is used by the ssh client.ssh/id_dsa. separated by commas.ssh/authorized_keys Lists the public keys (RSA/DSA) that can be used for logging in as this user.ssh/authorized_keys on all machines where the user wishes to log in using protocol version 2 DSA/RSA authentication. When different names are used for the same machine. The contents of the $HOME/.ssh/config This is the per-user configuration file.ssh/authorized_keys on all machines where the user wishes to log in using protocol version 1 RSA authentication.pub. $HOME/. These files are not sensitive and can (but need not) be readable by anyone. the passphrase will be used to encrypt the sensitive part of this file using 3DES. $HOME/. In the simplest form the format is the same as the . The format of this file is described in the sshd(8) manual page. The format is described on the sshd(8) manual page. This file should be worldreadable.

Additionally. this will automatically add the host key to $HOME/. The purpose for having this file is to be able to use rhosts authentication with ssh without permitting login with rlogin(1) or rsh(1). It contains canonical hosts names. Additionally.equiv. and must not have write permissions for anyone else.shosts This file is used exactly the same way as . it can be stored in $HOME/.rhosts This file is used in . $HOME/.rhosts authentication to list the host/user pairs that are permitted to log in.rhosts authentication. /etc/ssh/shosts. $HOME/. This file provides defaults for those values that are not specified in the user's configuration file.4 Page 95 March 31.ssh/known_hosts.ssh/known_hosts. separated by a space. The easiest way to do this is to connect back to the client from the server machine using ssh. and not accessible by others. successful RSA host authentication is normally required. The recommended permission for most machines is read/write for the user. /etc/ssh/ssh_config Systemwide configuration file.) Each line of the file contains a host name (in the canonical form returned by name servers). because someone with access to the name servers would then be able to fool host authentication. because sshd(8) reads it as root. On some machines this file may need to be world-readable if the user's home directory is on a NFS partition.rhosts authentication. /etc/hosts. (Note that this file is also used by rlogin and rsh. This file may be useful to permit logins using ssh but not using rsh/rlogin. If the server machine does not have the client's host key in /etc/ssh/ssh_known_hosts. This file must be world-readable.equiv This file is processed exactly as /etc/hosts.rhosts. This file should only be writable by root. login is automatically permitted provided client and server user names are the same. 2008 . and for those users who do not have a configuration file. If the client host is found in this file.equiv This file is used during . which makes using this file insecure. one per line (the full format is described on the sshd(8) manual page). and then a user name on that host.are needed because ssh does not convert the user-supplied name to a canonical name before checking the key. NSK-SSH V2. this file must be owned by the user. Note that by default sshd(8) will be installed so that it requires successful RSA host authentication before permitting .

rsh(1). Rinne. keygen(1). Kivinen.txt. draft-ietf-secsh-architecture-09. Lehtinen. scp(1). SEE ALSO rlogin(1). sshd(8) ssh-add(1). 2008 .4 Page 96 March 31. telnet(1). see section ENVIRONMENT above. SSH Protocol Architecture. T. ssh- T. $HOME/. sftp(1).ssh/environment Contains additional definitions for environment variables. M. See the sshd(8) manual page for more information. See the sshd(8) manual page for more information. ssh-agent(1). July 2001. work in progress material./etc/ssh/sshrc Commands in this file are executed by ssh when the user logs in just before the user's shell (or command) is started. T. NSK-SSH V2. Saarinen. $HOME/. Ylonen.ssh/rc Commands in this file are executed by ssh when the user logs in just before the user's shell (or command) is started. and S.

# for more information. 2008 . Port 22 #Protocol 2.1 ListenAddress 0.0.APPENDIX B .shosts files IgnoreRhosts yes # For this to work you will also need host keys in /etc/ssh/ssh_known_hosts RhostsRSAAuthentication no # similar for protocol version 2 See sshd(8) NSK-SSH V2.0 #ListenAddress :: # HostKey for protocol version 1 HostKey /etc/ssh/ssh_host_key # HostKeys for protocol version 2 HostKey /etc/ssh/ssh_host_rsa_key HostKey /etc/ssh/ssh_host_dsa_key # Lifetime and size of ephemeral version 1 server key KeyRegenerationInterval 3600 ServerKeyBits 768 # Logging SyslogFacility AUTH LogLevel INFO #obsoletes QuietMode and FascistLogging # Authentication: LoginGraceTime 600 PermitRootLogin yes StrictModes yes RSAAuthentication yes PubkeyAuthentication yes #AuthorizedKeysFile %h/.FILES sshd_config FILE # This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/ssh/bin # This is the sshd server system-wide configuration file.0.4 Page 97 March 31.ssh/authorized_keys # rhosts authentication should not be used RhostsAuthentication no # Don't read the user's ~/.rhosts and ~/.

ssh/known_hosts for RhostsRSAAuthentication #IgnoreUserKnownHosts yes # To disable tunneled clear text passwords. change to no here! PasswordAuthentication yes PermitEmptyPasswords no # Uncomment to disable s/key passwords #ChallengeResponseAuthentication no # Uncomment to enable PAM keyboard-interactive authentication # Warning: enabling this may bypass the setting of 'PasswordAuthentication' #PAMAuthenticationViaKbdInt yes # To change Kerberos options #KerberosAuthentication no #KerberosOrLocalPasswd yes #AFSTokenPassing no #KerberosTicketCleanup no # Kerberos TGT Passing does only work with the AFS kaserver #KerberosTgtPassing yes X11Forwarding no X11DisplayOffset 10 PrintMotd yes #PrintLastLog no KeepAlive yes #UseLogin no #MaxStartups 10:30:60 #Banner /etc/issue. 2008 .4 Page 98 March 31.net #ReverseMappingCheck yes Subsystem Subsystem sftp sftp-g /usr/local/ssh/libexec/sftp-server /usr/local/ssh/libexec/sftp-server-guardian NSK-SSH V2.HostbasedAuthentication no # Uncomment if you don't trust ~/.

# Site-wide defaults for various options # Host * # ForwardAgent no # ForwardX11 no # RhostsAuthentication no # RhostsRSAAuthentication yes # RSAAuthentication yes # PasswordAuthentication yes # FallBackToRsh no # UseRsh no # BatchMode no # CheckHostIP yes # StrictHostKeyChecking yes # IdentityFile ~/.ssh/id_rsa # Port 22 # Protocol 2. system-wide file Any configuration value is only changed the first time it is set. command line options 2. Thus. and the values can # be changed in per-user configuration files or on the command line. 2008 . This file provides defaults for users. # # # # # # # Configuration data is parsed as follows: 1. and defaults at the end. host-specific definitions should be at the beginning of the configuration file.ssh_config FILE # This is ssh client systemwide configuration file.4 Page 99 March 31. See ssh(1) for more # information.1 # Cipher blowfish # EscapeChar ~ NSK-SSH V2. user-specific file 3.ssh/id_dsa # IdentityFile ~/.ssh/identity # IdentityFile ~/.

4 Page 100 March 31.Note: This page is left blank for double sided printing. NSK-SSH V2. 2008 .

2008 .TELNET ISOLATION FILES start_ssh_2_cpu_2stack.4 Page 101 March 31.APPENDIX C .sh FILE ############################################ # Start SSH with IPSSH across two cpus ## ## Start the SSH process on port 700 and 701 export TCPIP_TELNET_STACK=\$ztc99 run -cpu=0 sshd -p 700 run -cpu=1 sshd -p 701 ## Start the primary IPSSH ($ISX) process run -cpu=0 ipssh sleep 5 ## Start the backup IPSSH ($ISY) process run -cpu=1 ipssh -wait 0 # Startup complete NSK-SSH V2.

Note: This page is left blank for double sided printing. 2008 . NSK-SSH V2.4 Page 102 March 31.

& startupmsg & "-c /usr/local/ssh/install/start_ipssh_ztc0a. & startmode manual. & name $ob010. & outfile $zhome. 2008 .& HOMETERM $zhome.system.& primarycpu 0.osh.& userid 255. & AUTORESTART 10.ZZKRN FILES ipztc00a FILE allow 10 errors assu process $zzkrn delete process IPSSH-ztc00a add process IPSSH-ztc00a.& program $system.4 Page 103 March 31.255.sh FILE export PATH=$PATH:/usr/local/ssh/bin:/usr/local/ssh/sbin export PATH=$PATH:/usr/local/random/bin add_define =tcpip^process^name class=map file=\$ztc0 # # Start the IPSSH in CPU 0 using zzkrn # echo "Starting IPSSH on PORT 22" # kill -s SIGGUARDIAN /G/ip000 run -name=/G/ip000 -cpu=0 -gpri=155 -term=/G/zhome ipssh1 -D wait 0 # NSK-SSH V2.sh <.APPENDIX D .>>/dev/null 2>/dev/null" start process IPSSH-ztc00a start_ipssh_ztc0a.

& startmode manual.& userid 255.ipztc00b FILE allow 10 errors assu process $zzkrn delete process IPSSH-ztc00b add process IPSSH-ztc00b.& HOMETERM $zhome.>>/dev/null 2>/dev/null" start process IPSSH-ztc00b start_ipssh_ztc0b. 2008 .sh FILE export PATH=$PATH:/usr/local/ssh/bin:/usr/local/ssh/sbin export PATH=$PATH:/usr/local/random/bin add_define =tcpip^process^name class=map file=\$ztc0 # # Start the IPSSH in CPU 1 using zzkrn # echo "Starting IPSSH on PORT 22" # # Note that the wait 0 is used just incase the other ipssh process # has been started and is on port 22.& program $system.osh.& startupmsg & "-c /usr/local/ssh/install/start_ipssh_ztc0b. & name $ob011.255. # kill -s SIGGUARDIAN /G/ip001 run -name=/G/ip001 -cpu=1 -gpri=155 -term=/G/zhome ipssh1 -D -wait 0 # NSK-SSH V2.& primarycpu 1. & outfile $zhome. & AUTORESTART 10. this process will take over.4 Page 104 March 31.sh <. If the other ipssh process # dies.system.

& program $system.sh <.& HOMETERM $zhome. & AUTORESTART 10.system.osh.255.sh FILE export PATH=$PATH:/usr/local/ssh/bin:/usr/local/ssh/sbin export PATH=$PATH:/usr/local/random/bin add_define =tcpip^process^name class=map file=\$ztc0 # # Start the Random Number Generater in CPU 0 using zzkrn # echo "Starting Random Number Generator TCPIP 790" # kill -s SIGGUARDIAN /G/rb000 run -name=/G/rb000 -cpu=0 -gpri=144 -term=/G/zhome prngd -f tcp/localhost:790 # NSK-SSH V2. & name $ob000. & outfile $zhome.& startupmsg & "-c /usr/local/ssh/install/start_random_ztc00a. 2008 . & startmode manual.& primarycpu 0.& userid 255.>>/dev/null 2>/dev/null" start process RANDOM-ztc00a start_random_ztc00a.ranztc0a FILE allow 10 errors assu process $zzkrn delete process RANDOM-ztc00a add process RANDOM-ztc00a.4 Page 105 March 31.

& outfile $zhome.& HOMETERM $zhome.& startupmsg & "-c /usr/local/ssh/install/start_random_ztc00b.>>/dev/null 2>/dev/null" start process RANDOM-ztc00b start_random_ztc0b.sh FILE export PATH=$PATH:/usr/local/ssh/bin:/usr/local/ssh/sbin export PATH=$PATH:/usr/local/random/bin add_define =tcpip^process^name class=map file=\$ztc0 # # Start the Random Number Generater in CPU 1 using zzkrn # echo "Starting Random Number Generator TCPIP 791" # kill -s SIGGUARDIAN /G/rb001 run -name=/G/rb001 -cpu=1 -gpri=144 -term=/G/zhome prngd -f tcp/localhost:791 # NSK-SSH V2.255.& primarycpu 1.ranztc0b FILE llow 10 errors assu process $zzkrn delete process RANDOM-ztc00b add process RANDOM-ztc00b. 2008 . & AUTORESTART 10. & name $ob001.& program $system.& userid 255.4 Page 106 March 31.osh.system. & startmode manual.sh <.

system. & outfile $zhome. & name $ob020. 2008 .& primarycpu 0. & AUTORESTART 10.osh.& userid 255.& HOMETERM $zhome.>>/dev/null 2>/dev/null" start process SSHD-ztc00a start_sshd_ztc00a.& startupmsg & "-c /usr/local/ssh/install/start_sshd_ztc00a. & startmode manual.sdztc00a FILE allow 10 errors assu process $zzkrn delete process SSHD-ztc00a add process SSHD-ztc00a.& program $system.4 Page 107 March 31.sh <.255.sh FILE export PATH=$PATH:/usr/local/ssh/bin:/usr/local/ssh/sbin export PATH=$PATH:/usr/local/random/bin add_define =tcpip^process^name class=map file=\$ztc0 # # Start the SSHD in CPU 0 using zzkrn # echo "Starting SSHD on PORT 700" # kill -s SIGGUARDIAN /G/sd000 run -name=/G/sd000 -cpu=0 -gpri=154 -term=/G/zhome sshd -D -p 700 # NSK-SSH V2.

255. & outfile $zhome. 2008 .& HOMETERM $zhome.& userid 255.& program $system.& startupmsg & "-c /usr/local/ssh/install/start_sshd_ztc00b. & name $ob021. & AUTORESTART 10.>>/dev/null 2>/dev/null" start process SSHD-ztc00b start_sshd_ztc00b.& primarycpu 1.sh <.4 Page 108 March 31.sh FILE export PATH=$PATH:/usr/local/ssh/bin:/usr/local/ssh/sbin export PATH=$PATH:/usr/local/random/bin add_define =tcpip^process^name class=map file=\$ztc0 # # Start the SSHD in CPU 1 using zzkrn # echo "Starting SSHD on PORT 701" # kill -s SIGGUARDIAN /G/sd001 run -name=/G/sd001 -cpu=1 -gpri=154 -term=/G/zhome sshd -D -p 701 # NSK-SSH V2.sdztc00b FILE allow 10 errors assu process $zzkrn delete process SSHD-ztc00b add process SSHD-ztc00b.system.osh. & startmode manual.

4 Page 109 March 31. 2008 .INSTALL NOTES: NSK-SSH V2.

Note: This page is left blank for double sided printing. NSK-SSH V2. 2008 .4 Page 110 March 31.

Sign up to vote on this title
UsefulNot useful