Telnet/SSH Connecting to Hosts Internet Technology 1
What is Telnet? Method for connecting to hosts Enables remote login (rlogin) to computers on the Internet One computer can connect to another to use its services Like Window s Remote Desktop Establishes a dumb terminal session No processing on the client side once connected Local terminal appears to be a terminal at the remote system. Simple input/output device Client-Server Application Users (clients) connect to multiuser computers (servers) Uses telnet protocol (port 23) over Internet (TCP/IP) One of the first Internet applications (1968) Internet Technology 2
Why Telnet? Before PC became popular People used terminals physically connected to big computers (e.g., mainframes) Problems Need a terminal per machine per user 3 mainframes & 5 users = 15 terminals Like having 10 TVs to view 10 channels Difficult to access over distance Telnet protocol made possible terminal emulation i.e., virtual terminal regardless of location & hardware any computer running telnet client can connect to & use any computer running telnet server over Internet (TCP/IP, physical layer) Internet Technology 3
Telnet: Client-Server Architecture Telnet Server The actual server is software that runs typically on larger computers with multi-user, multi-tasking operating systems like Unix & a full-time/direct/high-speed connection to Internet May provide dumb terminal access to external data & services library database or commercial service internal data & applications files on disk, shell account Telnet Client The software that initiates a telnet connection Provides the interface and a set of features for the end user e.g., allow user to use custom fonts/colors Internet Technology 4
Telnet: How to Use telnet HOSTNAME PORTNUMBER HOSTNAME = host name or IP address PORTNUMBER = port Default telnet (login) port = 23 Web server port = 80 Examples telnet widit.knu.ac.kr 80 Connect to WIDIT Web Server telnet rainmaker.wunderground.com Access weather information telnet sdf.lonestar.org Create a shell account at SDF Public Access Unix System Internet Technology 5
Telnet: Weakness Telnet suffers from a major security problem Communication is done in plain text Data from/to client and server can be captured by a LAN computer using a snooper software ID, password Snooper Telnet Client 1 Banking info Telnet Client 2 Telnet Server Internet Technology 6
SecureSHell Overview Replacement for Telnet Communication between computers using encryption Encryption = transform data in unreadable form Communication is encrypted over a secure channel Current standard for remote login (port 22) History Secure command shell (remote execution of commands) Originated from an academic project in Finland Commercialized in 1998 by SSH Communications Security SSH1 expired in May 1995 because of security flaws SSH2 is currently used Client Software SSH Client MobaXterm PuTTY Internet Technology 7
SSH: Client-Server Architecture SSH Client Initiates a Connection SSH Server Waits & Responds to Incoming Connections 203.247.16.240 155.230.194.245 Client Application program running on client machine (e.g., Putty, SSH Secure Shell) Application Protocol (SSH) Encrypted Data Server Application program running on server machine (e.g., Open SSH Server ) Internet Technology 8
FTP/SFTP Transferring Files Internet Technology 9
FTP Overview Used to transfer files from one computer to another Port 20, 21 - one to send data and one to send commands A basic Internet service (like telnet and email) Works with all types of computers (Unix, pc, mac, etc.) & all types of files ( binary and text ) One of the first Internet applications (1971) Involves Navigation on both client and server User authentication Exception: Anonymous FTP Allows access to public FTP sites Only allows access to specific directories e.g., login ID=anonymous, password=email address Suffers from security problem similar to Telnet Internet Technology 10
SFTP Overview Stands for SSH File Transfer Protocol Provides Secure data transfer by data encryption over an SSH session Replacement for FTP SFTP Clients GUI Interactive file transfer programs Perform all operations over an encrypted transport Examples SSH Secure File Transfer (includes SSH client: SSH Secure Shell) WinSCP supports SFTP & SCP FileZilla cross platform (Windows, Linux, Mac OS) Internet Technology 11
SSH & SFT Clients PuTTY & SSH Secure File Transfer Internet Technology 12
SSH Client: PuTTY PuTTY configuration 1. Download and double click PuTTY 2. Type in the Host Name (e.g. widit.knu.ac.kr) and click Open 3. Login Internet Technology 13
SSH Client: PuTTY PuTTY configuration (continued) 4. Right-click the top blue bar of the PuTTY window 5. Select Change Settings 6. Select Translation under Window Category 7. Set Character set translation to UTF-8 Internet Technology 14
SSH Client: PuTTY PuTTY configuration (continued) 8. Select Appearance under Window Category 9. Set Font settings to desired font if needed 10. Select Colors under Window Category 11. Set Default Foreground and Default Background to desired colors if needed 12. Click Apply to apply the current settings. Internet Technology 15
SSH Client: PuTTY PuTTY configuration (continued) 13. Click the Session category 14. Type in a name for the current configuration (e.g., widit) in the Saved Sessions box 15. Click Save to save the current settings 16. Next time, you can right-click the top blue bar and select Saved Sessions to choose the appropriate session (e.g. widit) Internet Technology 16
SFTP Client: FileZilla In the FileZilla s main menu, 1. Click File and 2. select Site Manager. In the Site Manager window, 1. Click New Site 2. Type in the Remote Host Name (e.g. widit.knu.ac.kr) 3. Select SFTP Protocol 4. Select Ask for password Logon Type 5. Type in your User Name (leave the password blank) 6. Click the Rename button 7. Type in a site name (e.g., widit) 8. Click Connect Internet Technology 17
SFTP Client: FileZilla Internet Technology 18
SFTP Client: FileZilla Adding Bookmarks: 1. Go to target directories by typing in the path in the site address box (A) or traversing the directory tree (B). 2. Click Bookmarks and 3. Select Add bookmark. 4. Select Site-specific bookmark and 5. Type in the bookmark name The saved bookmark should appear under the Bookmarks menu. Internet Technology 19
SFTP Client: FileZilla displays saved site profile toggles the display of the message log toggles the display of the local directory tree toggles the display of the remote directory tree toggles the display of the transfer queue Refreshes the file and folder lists Internet Technology 20
SFTP Client: FileZilla Using Quickconnect: In the Quickconnect bar, Type in Host name, Username, Password, Port value of 22, Click the Quickconnect button, and Click OK to connect. Click File in the Menu bar, and Select Copy current connection to Site Manager. In the Site Manager window, Type in the site name and Click OK. The saved connection should appear in the Site Manager. Internet Technology 21