0% found this document useful (0 votes)
67 views4 pages

Lab 3 Report

The document summarizes setting up SSH on different platforms. SSH was already installed on Fedora but needed to be installed and configured on Ubuntu by installing openssh-server and editing configuration files. Key-based authentication was also configured. Cygwin SSH setup required additional steps like setting environment variables and file permissions.

Uploaded by

neuclearalpha
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views4 pages

Lab 3 Report

The document summarizes setting up SSH on different platforms. SSH was already installed on Fedora but needed to be installed and configured on Ubuntu by installing openssh-server and editing configuration files. Key-based authentication was also configured. Cygwin SSH setup required additional steps like setting environment variables and file permissions.

Uploaded by

neuclearalpha
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Nathaniel Schumacher

Server Integration
Paul Burkholder
Lab3 Report
3-08-09

Reflection:
Setting up SSH was not difficult but there were differences between the OSs.
Fedora supported more features that ubuntu did not have available, which is odd
since both are running the same ssh client/server. We tried to copy some of the
commands that were in fedora into the ubuntu sshd_config file, but whenever we
did that we would get program start errors. Of all the SSH setups, cygwin was
definitely the tougher one. We got it install, but as far as configuring it, it too does
not support all the features of the fedora SSH setup.

Procedure:

SSH was already installed on the Fedora machine but not on the ubuntu servers. To
install and configure SSH on the ubuntu server I had to
– apt-get install sshd
– then to start the service it is /etc/init.d/ssh start
○ /etc/init.d/sshd will not work on ubuntu
– the config files are then located under /etc/ssh
○ to edit the ssh server configuration it is the /etc/ssh/sshd_config

– # Package generated configuration file


– # See the sshd(8) manpage for details

– # What ports, IPs and protocols we listen for
– Port 3222
– # Use these options to restrict which interfaces/protocols sshd will
bind to
– #ListenAddress ::
– ListenAddress 10.10.3.200
– Protocol 2
– # HostKeys for protocol version 2
– HostKey /etc/ssh/ssh_host_rsa_key
– HostKey /etc/ssh/ssh_host_dsa_key
– #Privilege Separation is turned on for security
– UsePrivilegeSeparation yes

– # Lifetime and size of ephemeral version 1 server key
– KeyRegenerationInterval 3600
– ServerKeyBits 768

– # Logging
– SyslogFacility AUTH
– LogLevel INFO

– # Authentication:
– LoginGraceTime 120
– PermitRootLogin no
– StrictModes yes
– #StrictModes yes

– RSAAuthentication yes
– PubkeyAuthentication yes
– AuthorizedKeysFile %h/.ssh/authorized_keys

– # Don't read the user's ~/.rhosts and ~/.shosts files
– IgnoreRhosts yes
– # For this to work you will also need host keys in /etc/ssh_known_hosts
– RhostsRSAAuthentication no
– # similar for protocol version 2
– HostbasedAuthentication no
– # Uncomment if you don't trust ~/.ssh/known_hosts for
RhostsRSAAuthentication
– #IgnoreUserKnownHosts yes

– # To enable empty passwords, change to yes (NOT RECOMMENDED)
– PermitEmptyPasswords no

– # Change to yes to enable challenge-response passwords (beware issues
with
– # some PAM modules and threads)
– ChallengeResponseAuthentication no
– PermitTunnel yes
– # Change to no to disable tunnelled clear text passwords
– #PasswordAuthentication yes

– # Kerberos options
– #KerberosAuthentication no
– #KerberosGetAFSToken no
– #KerberosOrLocalPasswd yes
– #KerberosTicketCleanup yes

– # GSSAPI options
– #GSSAPIAuthentication no
– #GSSAPICleanupCredentials yes

– X11Forwarding yes
– X11DisplayOffset 10
– PrintMotd no
– PrintLastLog yes
– TCPKeepAlive yes
– #UseLogin no

– #MaxStartups 10:30:60
– Banner /etc/issue.net

– # Allow client to pass locale environment variables
– AcceptEnv LANG LC_*

– Subsystem sftp /usr/lib/openssh/sftp-server

– UsePAM yes
○ The banner was setup under the /etc/issue.net file and specified
in the config file
– After restarting the service and testing that we were able to login to
the machine we then setup our key-based authentication
○ this was done through generating new keys with the ssh-keygen –t
rsa –b 2048
○ this was generated under the cpt224 user account for that machine
with a generic passphrase used
○ we then copied the new public key into the
/home/cpt224/.ssh/authorized_keys
 cp id_rsa.pub authorized_keys
 this file location was verified in the sshd_config file
%h/.ssh/authorized_keys setting
– next was to setup the windows box to test the new key authentication
○ to do this we had to use a USB drive to copy over the private key
(winscp was erroring out for us)
○ we then used putty to convert the key to a putty readable format
 in putty gen
• file, load private key, enter the passphrase, and then
resave the key
 now back in putty
• under connection, ssh, auth, insert the private key that
was saved, check session and enter in the username and
port number (cpt224:3222)

Our cygwin install was based off of a tutorial found from cygwin.com

1) Run Cygwin setup.exe


a. During the installation process in the wizard set dependencies.
b. Click Open SSH and be sure that the check boxes are checked. Be sure
Open SSH has and x in the check box as well as TCP_Wrappers. Click the
Skip Button to fill in the check box. Click Next and the Installation will
finish up.
2) Set the Environmental Variables
a. Right click my computer, select properties, and click Advanced, then
Environment Variables.
b. At the bottom scroll down to Cygwin and select Edit. (Or Create New If
non existing)
c. In the variable value type ntsec tty. The Variable name is CYGWIN Click
OK and close
3) Set Permission to the Files to prevent access problems.
a. Double click the cygwin shortcut on the desktop to access the command
line interface.
b. Set permissions using the commands given.
– Chmod +r /etc/passwd
– Chmod +r /etc/group
Chmod 777 /var
4) Modify the Host.allow file to prevent errors. “ssh-exchange-
identification: connection closed by remote host”
a. Edit the file /etc/host.allow with wordpad in windows. Add these two lines
before the Paranoid line.
ALL: 127.0.0.1/32 : allow
ALL: [::1]/128: allow

Note: Make sure every windows user has a password set. If not go to
Windows Control Panel, User Accounts , and Create Password.
5) Run ssh-host-config command
a. When asked about “privilege separation” answer yes
b. When asked about “Create a local user sshd on this machine” answer yes
c. When asked about “ install sshd as a service” answer yes
6) Use the mkpasswd and mkgroup commands to generate passwords
for all users and groups in the windows users list.
a. Mkpasswd -cl > /etc/passwd
b. MKgroup --local > etc/group
7) Start up SSH with the Netstart SSHD command.
8) Verify that SSH Is working correctly
a. CD /cygdrive/c
Ls
b. If you see a directory listing the operation was successful.

You might also like