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

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

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

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

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

INSTALLING THE SOFTWARE You must be the root user or super. SSH and PRNGD software.Z | pax -rvf - For the H-Series and J-Series operating system: export PATH=$PATH:/bin/unsupported:/bin zcat SSH_H0605_V24. do the following: For the S-Series: export PATH=$PATH:/bin/unsupported:/bin zcat SSH_GO622_V24.tar. To install the software that was downloaded from the web site. 2008 . IPSSH.Z | pax -rvf - Note that zcat is in the /bin/unsupported directory.4 Page 3 March 31. NSK-SSH V2.tar. Note that the above tar file may have a version indicator on it.super to install this software. 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.

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

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

2008 .profile”. NSK-SSH V2. then you need to add it using vi. If you are using the default tcpip process name $ZTC0. THE TELNET ACCESS TO SSH WILL NOT WORK. a. or that you want to random number generator to use. You should use what ever tcpip process name is defined on your system. Set your PATH and MANPATH variables. 4.sh 5. Move to the install directory cd /usr/local/ssh/install b.4 Page 6 March 31. NOTE IF YOU DO NOT HAVE A /etc/services FILE.If the services program does not have this line. then it is not necessary to do this step. 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. 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 “. Execute a script to change the file setting sh -v . 3. But if you are using some other tcpip process name. Set the correct file settings on the installed files./ssh_install_chmod. Verify that the define =TCPIP^PROCESS^NAME is already set.

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

If you want to start ssh on one cpu. 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.0. then continue reading. scf> abort #ssh-ztc0 This will abort the process and then you can start up the NSK-SSH software.0 If you want to start the program in the debug mode to see what it is doing.9. before you can startup the NSK-SSH software.0. then you need to stop this software. If this is running. NSK-SSH V2. If there is more than one address associated with the stack then. The sshd program will process all request (session. then you need to stop it.0. then you should not change the ListenAddress to 127. If you want to start SSHD on two cpu’s scipt to step 10. scp.1 and change it to the real address of the stack. 10.0.4 Page 8 March 31. If you only run one SSHD server. 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. 2008 . ssh and sftp). scf> assume process $zzkrn scf>names You should look for #ssh-ztc0. you should leave it set to 0. 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.

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

NSK-SSH V2.4 Page 10 March 31.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. 2008 .

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. we have a solution that allows you to do this execpt for an isolated TCPIP stack with telnet running on the loop back port.ADVANCED SETUP OF SSH In this section. ipaddress 127. Start the #LOOP0 port on the stack.1 scf> start subnet * scf> exit NSK-SSH V2.sh. 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.CPU 0. our SSHD process can use this isolated stack for telnet access. This #LOOP0 is started and a TELSRV process is started against this and no listner process. TELNET ISOLATION For those of you that want to stop all of your telnet and ftp processes on the system. 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.TERM $ZHOME/0 2. Start up the TCPIP V4 stack at tacl: TCPIP/name $ZTC99.4 Page 11 March 31. we use the TCPIP process name $ztc99.PRI 190. 2008 . In our script call start_sshd_2cpu_2stack. With this configuration. To use this feature. scf> assume process $ztc99 scf> aler subnet #loop0. we will talk about advanced set up of the SSH software including the KERNEL subsystem and TELNET isolation.

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

is the following: cd /usr/local/ssh/install/zzkrn cp ZZKRNSD.*. you only need Note that you need you need to change 127. to be root or super.#RANDOM-ZTC00A $ZZKRN. prngd.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. 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.super to do this and your /etc/sshd.#IPSSH-ZTC00B $ZZKRN. scf> assume proces $zzkrn scf> volume $system.1. and sshd process running as persistant processes in the ZZKRN file. you have added the following servies: $ZZKRN.#RANDOM-ZTC00B NSK-SSH V2.100 /G/system/nosubvol/ZZKRNSD gtacl>logon super.0.config file to listen on port the ListenAddress configuration line.vol $system This will install the subvolume $system.*. This is to install the files in the zzkrn subsystem. $*.0.#IPSSH-ZTC00A $ZZKRN. 2008 . In the zzkrn subsystem.zzkrnsd on your system. Now.zzkrnsd The obey files adds the process service and starts up the service.4 Page 13 March 31.code 100 run zzkrnsd. What you need to do this.super volume /G/system/nosubvol fup alter zzkrnsd.

script name $ob10 .#SSHD-ZTC00B if you want to stop a service.process name $RD000 #RANDOM-ZTC01 .script name $ob001 .process name $RD001 #SSHD-ZTC00A . 2008 .script name $ob021 .process name $ip001 NSK-SSH V2.4 Page 14 March 31. these names are the following: #RANDOM-ZTC00 . 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 $ob000 .process name $ip000 #IPSSH-ZTC00B . When your system is started up. there are two process names used.process name $sd001 #IPSSH-ZTC00A . that process will be restarted. Note that when you abort the software.#SSHD-ZTC00A $ZZKRN.$ZZKRN.script name $ob020 . the process running in the script does not stop. 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. you must have a script to start up the SSH software in the correct order or it will not start at system startup. It is only when you restart the software.process name $sd000 #SSHD-ZTC00B .script name $ob11 .

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

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

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

2008 .If you want to logon directly to TACL.4 Page 20 March 31. NSK-SSH V2.bsi1. do the following: $ssh joshua@test.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.

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

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

1) and will use the define =TCPIP^PROCESS^NAME to get the currently defined TCPIP process stack name.0. System Reference Manual PRNGD(8) NSK-SSH V2. 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.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)] . 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..0..4 Page 23 March 31.MAN PAGES prngd PRNGD(8) NAME prngd . The option tcp/ip:addr:port allows the random number generator to liston on specified address instead of the loopback address.conf] -s or --seedfile seedpath use seedpath as seedfile [/etc/prngd-seed] -n or --no-seedfile no seedfile. 2008 .APPENDIX A . The default port that SSH uses for port access is 790 to 793 and the default local socket is /dev/egd-pool.

If any one of the CPU's fail. prngd tcp/localhost:790 prngd tcp/localhost:791 NSK-SSH V2. 2008 . if there is not a random number generator available. As a note. then a primary and back is good choice.168. then you can start up multiple random number generators using the same port number to spead the laod to multiple CPU's. If you are running P/TCPIP then you can have more than one random number generator using only port 790.1.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. 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. you will still have a random number generator available on the system. 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. most of SSH functions will not work. If you are using Parallel TCPIP with round robin. If you are using using regular TCPIP.4 Page 24 March 31. 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.

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

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

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

4 Page 28 March 31. you must change the define =TCPIP^PROCESS^NAME.-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. indicates that ipssh is to be run waited.The primary process name is /G/ISX ($ISX) and the backup process name is /G/ISY ($ISY). The default is 5. NSK-SSH V2. 2008 .

pub'' appended. The passphrase can be changed later by using the -p option. Normally this program generates the key and asks for a file in which to store the private key. $HOME/. For RSA1 keys. Specifying the -t option instead creates a key for use by SSH protocol version 2. 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.ssh/id_rsa. 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. The passphrase may be empty to indicate no passphrase (host keys must have an empty passphrase).authentication key generation.ssh/identity. Normally each user wishing to use SSH with RSA or DSA authentication runs this once to create the authentication key in $HOME/. a new key must be generated and copied to the corresponding public key to other machines. and provides very bad passphrases). Additionally. the system administrator may use this to generate host keys.4 Page 29 March 31. manages and converts authentication keys for ssh(1). or it may be a string of arbitrary length.ssh/id_dsa or $HOME/. If the passphrase is lost or forgotten. There is no way to recover a lost passphrase. ssh-keygen defaults to generating a RSA1 key for use by SSH prottocol version 1. The public key is stored in a file with the same name but ``.ssh-keygen SSH-KEYGEN(1) NAME ssh-keygen . there is also a comment field in the key file that is only System Reference Manual SSH-KEYGEN(1) NSK-SSH V2. 2008 . as seen in /etc/rc. The program also asks for a passphrase.

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

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

/etc/ssh/ssh_known_hosts NSK-SSH V2.2.1. users will be vulnerable to attacks. Forces ssh-keyscan to use IPv4 addresses only.1.4 Page 34 March 31.my.2. This will allow you to execute the software against other tcpip process stacks in addition to the standard process stack($ZTCO).-v Verbose mode. 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.4 name.2.n.my.name.4.2. if the security model allows such a risk.dsa -f ssh_hosts | \ sort -u . 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. Causes ssh-keyscan to print debugging messages about its progress.4.3.domain.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''. 2008 . SECURITY If a ssh_known_hosts file is constructed using ssh-keyscan without verifying the keys.ssh_known_hosts | diff ssh_known_hosts FILES Input format: 1.n.4. On the other hand. Forces ssh-keyscan to use IPv6 addresses only.1. -4 -6 DEFINES SUPPORTED This program supports the TCPIP^PROCESS^NAME define.3.domain.4.

net> added support for protocol version 2. and drops the connection as soon as it gets the key.mit.edu> wrote the initial version.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.sourceforge. 2008 . and Wayne Davison <wayned@users. This is because it opens a connection to the ssh port. sshd(8) AUTHORS David Mazieres <dm@lcs.4 Page 35 March 31.9. SEE ALSO ssh(1). NSK-SSH V2. reads the public key.

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

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

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

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

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

and sshd process running as persistant processes in the ZZKRN file. Now.super to do this and NSK-SSH V2. we use the TCPIP process name $ztc99. In our script call start_sshd_2cpu_2stack.sh. 2008 . This #LOOP0 is started and a TELSRV process is started against this and no listner process.zzkrnsd on your system.4 Page 41 March 31.vol $system This will install the subvolume $system. To use this feature. TELNET ISOLATION For those of you that want to stop all of your telnet and ftp processes on the system. $*.*. our SSHD process can use this isolated stack for telnet access. we have a solution that allows you to do this execpt for an isolated TCPIP stack with telnet running on the loop back port. Note that you need to be root or super. you only need to install the files in the zzkrn subsystem. What you need to do this.generator for each TCPIP stack that SSHD is running on.*.code 100 run zzkrnsd. 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. then you might need more than one and you can assign the extra ones to port 791 to 793. prngd. 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.100 /G/system/nosubvol/ZZKRNSD gtacl> <logon tacl> volume /G/system/nosubvol fup alter zzkrnsd. With this configuration. If your system is heavly used for SSH request. is the following: cd /usr/local/ssh/install/zzkrn cp ZZKRNSD. 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.

you have added the following servies: $ZZKRN.#IPSSH-ZTC00A $ZZKRN.#RANDOM-ZTC00A $ZZKRN.#IPSSH-ZTC00B $ZZKRN. This is the ListenAddress configuration line. 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.zzkrnsd The obey files adds the process service and starts up the service. The file contains keywordargument pairs. In the zzkrn subsystem.#SSHD-ZTC00B if you want to stop a service.config file to listen on port 127.#SSHD-ZTC00A $ZZKRN. one per line.0. scf> assume proces $zzkrn scf> volume $system.1. 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. 2008 . Lines starting with `#' and empty lines are interpreted as comments. CONFIGURATION FILE sshd reads configuration data from /etc/ssh/sshd_config (or the file specified with -f on the command line).4 Page 42 March 31.you need to change your /etc/sshd.0. NSK-SSH V2.#RANDOM-ZTC00B $ZZKRN.

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

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

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

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

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

4 Page 48 March 31. PidFile Specifies the file that contains the process identifier of the sshd daemon.pid. The default is ``yes''. Multiple options of this type are permitted. See also ListenAddress. ``without-password''.1''. (On some systems it is also printed by the shell. PrintLastLog Specifies whether sshd should print the date and time when the user last logged in. The argument must be ``yes''. PrintMotd Specifies whether sshd should print /etc/motd when a user logs in interactively. 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). or equivalent. All other authentication methods are disabled for root. If this option is set to ``without-password'' password authentication is disabled for root. 2008 . ``forced-commands-only'' or ``no''. The default is 22. If this option is set to ``no'' root is not allowed to login. The default is /var/run/sshd.) Protocol The default is ``yes''. The default is ``yes''. If this option is set to ``forced-commands-only'' root login with public key authentication will be allowed. /etc/profile. The possible values are ``1'' and ``2''. The default is ``2. Note that this option applies to protocol version 2 only. Specifies the protocol versions sshd should support. 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.PermitRootLogin Specifies whether root can login using ssh(1). Multiple versions must be commaseparated. Port Specifies the port number that sshd listens on. The default is ``yes''. PubkeyAuthentication Specifies whether public key authentication is allowed.

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

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. as users can always install their own forwarders. /usr/bin/X11/xauth. The default is ``no''. X11Forwarding will be disabled because login(1) does not know how to handle xauth(1) cookies. Note also. Time format examples: 600 10m 1h30m 600 seconds (10 minutes) 10 minutes 1 hour 30 minutes (90 minutes) NSK-SSH V2. The default is 10. Time Formats sshd command-line arguments and configuration file options that specify time may be expressed using a sequence of the form: time[qualifier]. 2008 . X11Forwarding Specifies whether X11 forwarding is permitted. Note that disabling X11 forwarding does not improve security in any way. This prevents sshd from interfering with real X11 servers.for remote command execution.4 Page 50 March 31. X11DisplayOffset Specifies the first display number available for sshd's X11 forwarding. that if this is enabled. XAuthLocation Specifies the location of the xauth(1) program.

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

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

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

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

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

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

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

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

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

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

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

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

If cmd is more than one command.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. SEE ALSO ssh(1) NSK-SSH V2. it should be enclosed in double or single quotes. there are two environment variables that may be set that will allow this to happen. ENVIRONMENT VARIABLES If you need to use the SCMD program in a batch file and do not want to prompt for a password.scmd SCMD(1) System Reference Manual SCMD(1) NAME scmd . -v used for displaying detail ssh information on stderr.Set this to indicate no password prompt GNOTTYPWD password . 2008 .secure command (remote command execution) SYNOPSIS scmd [-v] user@host cmd DESCRIPTION scmd is a command front-end for ssh. GNOTTY 1 .

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

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

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

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

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

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

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

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

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

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

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

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

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

Second. the user is immediately permitted to log in. $HOME/. and the rlogin/rsh protocol in general.4 Page 77 March 31. /etc/hosts. ssh connects and logs into the specified hostname.ssh/known_hosts in the FILES section).ssh SSH(1) NAME ssh . and if additionally the server can verify the client's host key (see /etc/ssh/ssh_known_hosts and $HOME/.rhosts. and the user names are the same on both sides. [Note to the administrator: /etc/hosts. DNS spoofing and routing spoofing. 2008 . and provide secure encrypted communications between two untrusted hosts over an insecure network.equiv or /etc/ssh/shosts.shosts.equiv.rhosts. if the machine the user logs in from is listed in /etc/hosts. $HOME/. the user is permitted to log in. 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.equiv.rhosts or .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 on the remote machine. It means that if the login would be permitted by $HOME/.equiv method combined with RSA-based host authentication.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. only then login is permitted. if . This form of authentication alone is normally not allowed by the server because it is not secure. The second authentication method is the rhosts or hosts. It is intended to replace rlogin and rsh. X11 connections and arbitrary TCP/IP ports can also be forwarded over the secure channel. This authentication method closes security holes due to IP spoofing. or /etc/ssh/shosts. are inherently insecure and should be System Reference Manual SSH(1) NSK-SSH V2.equiv.

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

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

and happens because ssh creates a ``proxy'' X server on the server machine for forwarding the connections over the encrypted channel.The supported escapes (assuming the default `~') are: ~. ssh will also automatically set up Xauthority data on the server machine. For this purpose. The real authentication cookie is never sent to the server machine (and no cookies are sent in the plain). but with a display number greater than zero. NSK-SSH V2. 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. Forwarding of X11 connections can be configured on the command line or in configuration files. One possible application of TCP/IP forwarding is a secure connection to an electronic purse. Forwarding of arbitrary TCP/IP connections over the secure channel can be specified either on the command line or in a configuration file. store it in Xauthority on the server. it will generate a random authorization cookie. The DISPLAY value set by ssh will point to the server machine. and verify that any forwarded connections carry this cookie and replace it by the real cookie when the connection is opened.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). the connection to the agent is automatically forwarded to the remote side unless disabled on the command line or in a configuration file. If the user is using an authentication agent. 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. and the connection to the real X server will be made from the local machine. another is going through firewalls. The user should not manually set DISPLAY. This is normal.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

SSH Protocol Architecture. T. Ylonen. sshd(8) ssh-add(1). 2008 . $HOME/. Saarinen. Kivinen. telnet(1). work in progress material. ssh- T.ssh/environment Contains additional definitions for environment variables. and S. ssh-agent(1). draft-ietf-secsh-architecture-09. Rinne. T. rsh(1). scp(1). Lehtinen. $HOME/. NSK-SSH V2.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./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. See the sshd(8) manual page for more information. sftp(1). see section ENVIRONMENT above.4 Page 96 March 31. SEE ALSO rlogin(1). M. See the sshd(8) manual page for more information.txt. July 2001. keygen(1).

rhosts and ~/.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.APPENDIX B .4 Page 97 March 31.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. Port 22 #Protocol 2. # for more information. 2008 .1 ListenAddress 0.0.ssh/authorized_keys # rhosts authentication should not be used RhostsAuthentication no # Don't read the user's ~/.0.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/.

net #ReverseMappingCheck yes Subsystem Subsystem sftp sftp-g /usr/local/ssh/libexec/sftp-server /usr/local/ssh/libexec/sftp-server-guardian NSK-SSH V2.4 Page 98 March 31. 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.HostbasedAuthentication no # Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication #IgnoreUserKnownHosts yes # To disable tunneled clear text passwords. 2008 .

1 # Cipher blowfish # EscapeChar ~ NSK-SSH V2.ssh/id_dsa # IdentityFile ~/. and defaults at the end. # 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_config FILE # This is ssh client systemwide configuration file. command line options 2. and the values can # be changed in per-user configuration files or on the command line. See ssh(1) for more # information. This file provides defaults for users. system-wide file Any configuration value is only changed the first time it is set.4 Page 99 March 31. user-specific file 3. Thus. 2008 . host-specific definitions should be at the beginning of the configuration file.ssh/identity # IdentityFile ~/. # # # # # # # Configuration data is parsed as follows: 1.ssh/id_rsa # Port 22 # Protocol 2.

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

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.APPENDIX C . 2008 .4 Page 101 March 31.TELNET ISOLATION FILES start_ssh_2_cpu_2stack.

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

ZZKRN FILES ipztc00a FILE allow 10 errors assu process $zzkrn delete process IPSSH-ztc00a add process IPSSH-ztc00a.>>/dev/null 2>/dev/null" start process IPSSH-ztc00a start_ipssh_ztc0a.system.& HOMETERM $zhome.& userid 255.osh.APPENDIX D . & name $ob010.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.& primarycpu 0.4 Page 103 March 31. & outfile $zhome. & startmode manual.255. & AUTORESTART 10.& program $system. 2008 .& startupmsg & "-c /usr/local/ssh/install/start_ipssh_ztc0a.sh <.

>>/dev/null 2>/dev/null" start process IPSSH-ztc00b start_ipssh_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 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.system. & startmode manual.& primarycpu 1. If the other ipssh process # dies. this process will take over.4 Page 104 March 31. & outfile $zhome.& program $system.sh <. 2008 .& userid 255. & AUTORESTART 10.osh.ipztc00b FILE allow 10 errors assu process $zzkrn delete process IPSSH-ztc00b add process IPSSH-ztc00b. & name $ob011.& HOMETERM $zhome.255. # kill -s SIGGUARDIAN /G/ip001 run -name=/G/ip001 -cpu=1 -gpri=155 -term=/G/zhome ipssh1 -D -wait 0 # NSK-SSH V2.& startupmsg & "-c /usr/local/ssh/install/start_ipssh_ztc0b.

& primarycpu 0.system.& userid 255. & AUTORESTART 10. 2008 .ranztc0a FILE allow 10 errors assu process $zzkrn delete process RANDOM-ztc00a add process RANDOM-ztc00a.& program $system.& HOMETERM $zhome.255. & name $ob000.sh <.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.osh. & startmode manual.& startupmsg & "-c /usr/local/ssh/install/start_random_ztc00a.4 Page 105 March 31. & outfile $zhome.>>/dev/null 2>/dev/null" start process RANDOM-ztc00a start_random_ztc00a.

4 Page 106 March 31.>>/dev/null 2>/dev/null" start process RANDOM-ztc00b start_random_ztc0b.system. & outfile $zhome. & AUTORESTART 10.& HOMETERM $zhome.255. & startmode manual.ranztc0b FILE llow 10 errors assu process $zzkrn delete process RANDOM-ztc00b add process RANDOM-ztc00b.& program $system. & name $ob001.osh.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.sh <.& primarycpu 1.& userid 255. 2008 .& startupmsg & "-c /usr/local/ssh/install/start_random_ztc00b.

>>/dev/null 2>/dev/null" start process SSHD-ztc00a start_sshd_ztc00a.& program $system.4 Page 107 March 31.& startupmsg & "-c /usr/local/ssh/install/start_sshd_ztc00a.osh.& userid 255. 2008 .sdztc00a FILE allow 10 errors assu process $zzkrn delete process SSHD-ztc00a add process SSHD-ztc00a.& HOMETERM $zhome.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. & AUTORESTART 10.& primarycpu 0. & startmode manual. & outfile $zhome. & name $ob020.sh <.255.system.

& primarycpu 1. & startmode manual.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. 2008 . & outfile $zhome.>>/dev/null 2>/dev/null" start process SSHD-ztc00b start_sshd_ztc00b.4 Page 108 March 31.255.& program $system.& userid 255.system. & name $ob021.sh <.& startupmsg & "-c /usr/local/ssh/install/start_sshd_ztc00b. & AUTORESTART 10.osh.sdztc00b FILE allow 10 errors assu process $zzkrn delete process SSHD-ztc00b add process SSHD-ztc00b.& HOMETERM $zhome.

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

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

Sign up to vote on this title
UsefulNot useful