Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ssh on Red Hat Linux

Status
Not open for further replies.

alpaca

Technical User
Jul 8, 2000
3
CN
Hi.&nbsp;&nbsp;&quot;ssh&quot; seems to not exist on my <br>&nbsp;Linux machine, only &quot;telnet&quot;.&nbsp;&nbsp;But<br>&nbsp;to connect to another machine I need to use I can only use &quot;ssh&quot;, not &quot;telnet&quot;.<br>So, how do I put &quot;ssh&quot; on my Linux machine?<br><br>&nbsp;Thanks for any help you can offer!<br><br>&nbsp;&nbsp;&nbsp;Alpaca
 
Hi.&nbsp;&nbsp;Thanks to ati for his/her information!<br>I got the stuff from the web site and<br>installed ssh;&nbsp;&nbsp;I did not have any problems with the installation -- but when done I found ssh (or more correctly ssh2) did not work.&nbsp;&nbsp;If I type ssh2 blahblahblah <br>(or ssh or any of the other commands listed)<br>like I'm supposed to I only get &quot;Command not found&quot;.&nbsp;&nbsp;Am I forgetting something?&nbsp;&nbsp;<br>Basically I followed the instructions:<br>% zcat ssh-2.2.x.tar.gz ¦ tar xvf -<br>% cd ssh-2.2.x<br>% ./configure<br>%&nbsp;&nbsp;make<br>% make install&nbsp;&nbsp;&nbsp;<br>&nbsp;(as root)<br>% make clean-up-old<br>and all went fine it seemed.<br>There is one final set of instructions<br>entitled &quot;configure sshd2&quot; where<br>it seems I may need to set up some files.&nbsp;&nbsp;<br>I'm not sure what if anything I should do&nbsp;&nbsp;<br>&nbsp;here.&nbsp;&nbsp;This info is in the REAME file at<br>the site ati directed me to.<br><br><br>&nbsp;&nbsp;Thanks in advance to anyone who can help me to get ssh working!!!!!!!!!!!!!!!!<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Alpaca
 
When you type in 'which ssh2' what is your result??<br>Is ssh2 in your PATH?<br><br>
 
Dear ati,<br>&nbsp;&nbsp;&nbsp;Thanks again.&nbsp;&nbsp;When I type &quot;which ssh2&quot;,<br>I get &quot;ssh2: Command not found.&quot;<br>I do not know how to set the path.&nbsp;&nbsp;<br>I also cannot understand step 4 of the <br>README instructions which start like:<br>&nbsp;&nbsp;4. configure sshd2<br>&nbsp;&nbsp;&nbsp;------------------<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set up the following files:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>ssh 2 files<br>===========<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Public keys have a .pub suffix, private keys have no suffix.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;For example:&nbsp;&nbsp;&nbsp;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id_dsa_1024_a&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A 1024-bit DSA private key<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id_dsa_1024_a.pub&nbsp;&nbsp;&nbsp;&nbsp;The corresponding public key<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;There is no &quot;known_hosts&quot;, as in ssh1. The host keys are stored<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;in separate files in ~/.ssh2/hostkeys .<br><br><br>&nbsp;&nbsp;&nbsp;~/.ssh2/hostkeys/key_xxxx_yyyy.pub<br>&nbsp;&nbsp;&nbsp;-----------------------------<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This would be the public host key of the ssh2 daemon running in<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;port xxxx of the host yyyy.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/etc/ssh2/hostkey.pub&nbsp;&nbsp;and&nbsp;&nbsp;/etc/ssh2/hostkey<br>&nbsp;&nbsp;&nbsp;-----------------------------------------<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Public and private hostkeys for sshd2. Created by &quot;make install&quot;.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If this is not created by &quot;make install&quot; or you need to recreate<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;your host keypair, run<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# rm /etc/ssh2/hostkey*<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# ssh-keygen2 -P /etc/hostkey<br><br><br>&nbsp;&nbsp;&nbsp;~/.ssh2/identification<br>&nbsp;&nbsp;&nbsp;----------------------<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Lists the private keys that can be used for authentication.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# identification<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IdKey&nbsp;&nbsp;id_dsa_1024_a<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This means that the private key in the file ~/.ssh2/id_dsa_1024_a<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;is used for public key authentication. This is created by running<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the ssh-pubkeymgr script, or you can create it by hand.<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;~/.ssh2/authorization<br>&nbsp;&nbsp;&nbsp;---------------------<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Lists the public keys that are accepted for authentication on<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this host.<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# authorization<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Key&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id_dsa_1024_a.pub<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This means that anyone who holds the matching private key to the<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public key in the file $USER/.ssh2/id_dsa_1024_a.pub can log in<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;as $USER. This is also created by running the ssh-pubkeymgr script,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;or you can create it by hand.<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;/etc/ssh2/sshd2_config<br>&nbsp;&nbsp;&nbsp;-------------------- <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The server configuration file, copied here by &quot;make install&quot;.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;See the man page for details.<br>&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The line:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;subsystem-sftp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sftp-server<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;means that when the subsystem &quot;sftp&quot; is requested, the<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;command &quot;sftp-server&quot; is started. For example, if our sshd2_config<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;read:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;subsystem-quux&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo &quot;fim fam foo&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the command &quot;ssh2 host -s quux&quot; would simply print the text<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;fim fam foo&quot;.<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;~/.ssh2/ssh2_config<br>&nbsp;&nbsp;&nbsp;-------------------<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The client configuration file. See the global client config file<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ssh2_config in /etc/ssh2.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;~/.ssh2/ssh2_config<br>&nbsp;&nbsp;&nbsp;-------------------<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The client configuration file. See the global client config file<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ssh2_config in /etc/ssh2.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;~/.ssh2/knownhosts/xxxxyyyy.pub<br>&nbsp;&nbsp;&nbsp;-------------------------------<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;These are the public host keys of the hosts that a user wants to<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;log from using host based authentication (equivalent with SSH1's<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RhostsRSAAuthentication).<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Also, a user has to set up her/his ~/.shosts (which only SSH uses)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;or ~/.rhosts file (insecure, as it is also used by the r*-commands).<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If the username is the same in both hosts, it is adequate to put<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the public hostkey to /etc/ssh2/knownhosts and add the host's name to<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/etc/shosts.equiv (or /etc/hosts.equiv).<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xxxx denotes the hostname (FQDN) and yyyy the public key algorithm<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;of the key.<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;For example, zappa.foo.fi's hostkey algorithm is ssh-dss. The<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hostkey would be named<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;zappa.foo.fi.ssh-dss.pub<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;in the knownhosts directory.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Possible values for publickey-algorithms are &quot;ssh-dss&quot; and<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;ssh-rsa&quot; (without the quotes).<br><br><br>&nbsp;&nbsp;&nbsp;/etc/ssh2/knownhosts/xxxxyyyy.pub<br>&nbsp;&nbsp;&nbsp;---------------------------------<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;As above, but system-wide. These can be overridden by the user<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;by putting a file with the same name to her/his ~/.ssh2/knownhosts<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;directory.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;/etc/hosts.equiv and /etc/shosts.equiv<br>&nbsp;&nbsp;&nbsp;--------------------------------------<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Used to check whether authentication from host is allowed using<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;host based authentication. In its simplest form, the file contains<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;host names, one per line.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;For more information, see 'man sshd2'.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;~/.rhosts and ~/.shosts<br>&nbsp;&nbsp;&nbsp;-----------------------<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This file contains host-username-pairs, separated by spaces, one<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;per line. The given user from the specified host is allowed to<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;log in without a password.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;For more information, see 'man ssh2' and 'man sshd2'.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sorry, I just put the whole thing in.<br>I really do not know what, if any of this stuff, needs to be done to get it to work.<br><br>&nbsp;Thanks for any more advice you can offer.<br><br>&nbsp;&nbsp;Alpaca<br><br><br><br><br><br><br><br>
 
First you need to find out where ssh2 is on your filesystem.<br>Try this: find / -name ssh2<br>It will find ssh2 and return the Path.<br>Then edit your system profile in /etc/profile and add the Path in the variable PATH.<br><br>I never configured ssh2 manually, so I can't give you the right procedure on how to do it fool proof. I am using SuSE and it configures itself when installing from CD.<br>Why not trying a rpm package. This will help if you are not so experienced. You can find a redhat package of ssh2 here:<br><br><A HREF="ftp://utopia.hacktic.nl/pub/crypto/redhat/i386/" TARGET="_new">ftp://utopia.hacktic.nl/pub/crypto/redhat/i386/</A> <br><br><br>Andreas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top