Telnet SSH Walkthru

From SUSE Wiki

Jump to: navigation, search

elcnat erchir Type: Howto, Telnet and SSH Walkthru's

Tested Versions: 10.x

Written By: TuxRulz


Contents

Setting up a Telnet Server (SuSE)

1. Bring up YAST and go to SOFTWARE MANAGEMENT

2. In the SEARCH area, type in --> telnet and click the [SEARCH] button

3. Make sure TELNET and TELNET-SERVER are both selected

4. Always make sure to click on the [CHECK DEPENDENCIES] button for errors

5. Click on [OK], then [ACCEPT] It may ask for Disk #4

6. Click on [FINISH] under ‘Install more packages’

7. Go back to TERMINAL

8. How do you eject the CD? - Press the button, but if that fails - Go to TERMINAL and type in --> eject /dev/cdrom [ENTER]

9. Under YAST, go to SOFTWARE MANAGEMENT, then NETWORK SERVICES

10. Choose --> NETWORK SERVICES (XINETD)

11. Choose the ENABLE button, then scroll down to TELNET. Change the status of the service to [OK] by clicking on the [EDIT] button, then selecting the ‘Service is active’ button, then [ACCEPT], then [FINISH].

12. Go to a Windows or other Linux PC, and access a COMMAND prompt

13. Type --> telnet [ENTER]

14. Type --> open [ENTER]

15. Type --> <the IP Address of the TELNET host PC> and press [ENTER]

16. You should get a ‘Welcome…screen’ then a prompt for login/password

17. Does it work? If so, then GREAT! …. Else, why not? What steps would you go through to troubleshoot the issue? Please make a note of these.


Setting up an SSH Server

Purpose: To install, start and use an ssh server. (Is it already installed? How do I tell?...well, go to TERMINAL and type in --> ssh [ENTER] ….what do you get?)

If it is not running, THEN do the following:

1. Bring up YAST and go to SOFTWARE MANAGEMENT

2. In the SEARCH area, type in --> ssh and click the [SEARCH] button

3. Make sure ‘openssh’ and ‘openssh-askpass’ are both chosen

4. Click on [ACCEPT] then [FINISH] if you must install these packages

5. Close out of YAST

6. Open up a TERMINAL window

7. Is it running? Type in --> /etc/init.d/sshd status [ENTER]

8. Stop the service, type in --> /etc/init.d/sshd stop [ENTER]

9. Start the service again, type in --> /etc/init.d/sshd start [ENTER]

10. Make a new user on your machine and have a classmate try to access your machine by using this syntax --> ssh user@ipaddress [ENTER]

  a. user = this is the new user you created
  b. ipaddress = the IP address of your classmate’s machine

11. It should then try to do an RSA fingerprint, type --> yes

12. Then ask you for that user’s password

Can you access the other machine? Why or why not? What steps would you go through to troubleshoot the issue? Please list these.


Before you go further:

Ok....now you should have all the packages installed to finish up the lab....

1. Make a basic username and password (say....'student' and the password would be 'password')

2. Under this new user's 'home' folder (under HOME, then STUDENT) make a folder called 'stuff'. Copy a file to this folder....picture file?

3. Make a folder in the '/' drive called 'stuff2'


Using SSH to Transfer Files

You must allow SSH in your firewall settings –or- disable the firewall for time being. To allow TELNET (while you are here), select [ADVANCED] and add port '23' to TCP.

Use ‘chmod 777 …’ on the file to be copied and the folder to be copied to. You can always go back and lock down the security settings AFTER you get it working.

Example of secure copy (scp):

scp –r <username>@<IP_Address>:/<rem_folder>/<rem_file> /<loc_folder>/<loc_file>

rem = remote, where the file is at on the host machine loc = local, where you wish to copy the file down to

example: scp -r biteme@10.83.108.211:/home/Vaughnt1/biteme/Shared/agreement.jpg /stuff2/todd.jpg


Login to another computer using TELNET

1. Access TERMINAL

2. Type in --> telnet [ENTER]

3. Type in --> open [ENTER]

4. Obtain an IP address from another user/system

5. Ask for the basic username/password (if one)

6. Did you connect? How do you list the files in the folder?

7. How do you disconnect from the session? Type --> exit [ENTER]

8. Type --> exit to close out the TERMINAL screen


Access an FTP site from the TERMINAL prompt (any linux will do)

1. Access TERMINAL

2. Type in --> ftp [ENTER]

3. Type in --> open [ENTER]

4. Obtain an IP address from another user/system

5. Ask for the basic username/password (if one)

6. Did you connect? How do you list the files in the folder?

7. How do you disconnect from the session? Type --> exit [ENTER]

8. Type --> exit to close out the TERMINAL screen

Personal tools