OpenSSH: Secure Shell



Similar documents
SSH The Secure Shell

SSH and FTP on Ubuntu WNYLUG Neal Chapman 09/09/2009

Secure Shell. The Protocol

Pro OpenSSH. Michael Stahnke. Apress* =# # w^ l&l ## frsft. *,«.,*

SSH! Keep it secret. Keep it safe

SSH, SCP, SFTP, Denyhosts. Süha TUNA Res. Assist.

Task scheduling. Administrative automation Campus-Booster ID : **XXXXX. Copyright SUPINFO. All rights reserved

CASHNet Secure File Transfer Instructions

Defeating Firewalls : Sneaking Into Office Computers From Home

File Transfer Examples. Running commands on other computers and transferring files between computers

Configure Backup Server for Cisco Unified Communications Manager

Security Configuration Guide P/N Rev A05

Connectivity using ssh, rsync & vsftpd

Secure access to the DESY network using SSH

How to gain direct access to SQL Server at Garching via SSH

F-SECURE MESSAGING SECURITY GATEWAY

Source Code Management for Continuous Integration and Deployment. Version 1.0 DO NOT DISTRIBUTE

File transfer clients manual File Delivery Services

Securing Windows Remote Desktop with CopSSH

Implementing Secure Shell

Automated Offsite Backup with rdiff-backup

TS-800. Configuring SSH Client Software in UNIX and Windows Environments for Use with the SFTP Access Method in SAS 9.2, SAS 9.3, and SAS 9.

Secure Data Transfer

Secure File Transfer Installation. Sender Recipient Attached FIles Pages Date. Development Internal/External None 11 6/23/08

SSSD and OpenSSH Integration

freesshd SFTP Server on Windows

A SHORT INTRODUCTION TO BITNAMI WITH CLOUD & HEAT. Version

Configuring SSH and Telnet

Guide to the Configuration and Use of SFTP Clients for Uploading Digital Treatment Planning Data to IROC RI

Using sftp in Informatica PowerCenter

Securing Ship-to-Shore Data Flow

Stealth OpenVPN and SSH Tunneling Over HTTPS

How To Install Storegrid Server On Linux On A Microsoft Ubuntu 7.5 (Amd64) Or Ubuntu (Amd86) (Amd77) (Orchestra) (For Ubuntu) (Permanent) (Powerpoint

Securing Windows Remote Desktop with CopSSH

Install and configure SSH server

Back Up Linux And Windows Systems With BackupPC

Access Instructions for United Stationers ECDB (ecommerce Database) 2.0

CONNECTING TO DEPARTMENT OF COMPUTER SCIENCE SERVERS BOTH FROM ON AND OFF CAMPUS USING TUNNELING, PuTTY, AND VNC Client Utilities

Overview. Remote access and file transfer. SSH clients by platform. Logging in remotely

SERVER HARDENING. Presented by: Daniel Waymel and Corrin Thompson at TexSAW 2014 at the University of Texas at Dallas

Testing New Applications In The DMZ Using VMware ESX. Ivan Dell Era Software Engineer IBM

File Transfer Protocol (FTP) & SSH

HPCC - Hrothgar Getting Started User Guide

Easy Setup Guide 1&1 CLOUD SERVER. Creating Backups. for Linux

F-Secure SSH. for Windows. User s Guide

Step One: Installing Rsnapshot and Configuring SSH Keys

Aspera Proxy Red Hat, Debian ADMIN GUIDE

Contents. Part 1 SSH Basics 1. Acknowledgments About the Author Introduction

ASX SFTP External User Guide

Identity Management based on FreeIPA

MIGRATING TO AVALANCHE 5.0 WITH MS SQL SERVER

IBM WebSphere Application Server Version 7.0

Tighter SSH Security with Two-Factor

Secure Linux Administration Conference Bernd Strößenreuther

Final Year Project Interim Report

Authentication in a Heterogeneous Environment

Guide to the Configuration and Use of SFTP Clients for Uploading Digital Treatment Planning Data to ITC

MATLAB on EC2 Instructions Guide

RSA SecurID Token User Guide February 12, 2015

Adobe Marketing Cloud Using FTP and sftp with the Adobe Marketing Cloud

F-Secure. Securing the Mobile Distributed Enterprise. F-Secure SSH User's and Administrator's Guide

How to Tunnel Remote Desktop using SSH (Cygwin) for Windows XP (SP2)

Astaro Security Gateway V8. Remote Access via SSL Configuring ASG and Client

Connecting to Linux From Other Systems

SSL SSL VPN

File Transfers. Contents

IBM Aspera FASP Proxy Admin Guide 1.2.2

Extending Remote Desktop for Large Installations. Distributed Package Installs

HIPAA Compliance Use Case

Git - Working with Remote Repositories

Remote ESL On A Mac With OS-X Using SSH Tunneling & Port Forwarding

What is the Barracuda SSL VPN Server Agent?

WinSCP PuTTY as an alternative to F-Secure July 11, 2006

Setting Up Scan to SMB on TaskALFA series MFP s.

Dove User Guide Copyright Virgil Trasca

Comsol Multiphysics. Running COMSOL on the Amazon Cloud. VERSION 4.3a

Cloud Control Panel (CCP) Installation Guide

Requirements Collax Security Gateway Collax Business Server or Collax Platform Server including Collax SSL VPN module

Setup Hadoop On Ubuntu Linux. ---Multi-Node Cluster

If you prefer to use your own SSH client, configure NG Admin with the path to the executable:

CA ehealth. Remote Poller Guide. r6.1

Know your tools SSH. Dariusz Puchalak Dariusz_Puchalak < at > ProbosIT.pl

Using ZeBeDee with Firebird to Encrypt and Compress Network Traffic

Using SFTP on the z/os Platform

ShadowControl ShadowStream

Redpaper. Securing Communications with OpenSSH on IBM i5/os. Front cover. ibm.com/redbooks. Learn how to install, configure, and use SSH with i5/os

GpsGate Server. Installation and Administration Guide. Version: 2.2 Rev: 2

Tera Term Telnet. Introduction

SSH Secure Shell. Administrator s Guide

RELEASE NOTES. Release Notes. Introduction. Platform. Product/version/build: Remote Control ( ) ActiveX Guest 11.

Accessing VirtualBox Guests from Host using SSH, WinSCP and Tunnelling

Pragma FortressSSH 5.0

FileCruiser Backup & Restoring Guide

Remote Unix Lab Environment (RULE)

DEPLOYMENT GUIDE. This document gives a brief overview of deployment preparation, installation and configuration of a Vectra X-series platform.

SSH with private/public key authentication

Secure Remote Access with OpenSSH and rssh

Online Banking for Business Secure FTP with SSH (Secure Shell) USER GUIDE

SSL Tunnels. Introduction

Transcription:

OpenSSH: Secure Shell Remote console access Campus-Booster ID : **XXXXX www.supinfo.com Copyright SUPINFO. All rights reserved

OpenSSH: Secure Shell Your trainer Presenter s Name Title: **Enter title or job role. Accomplishments: **What makes the presenter qualified to present this course. Education: **List degrees if important. Publications: **Writings by the presenter on the subject of the course or presentation. Contact: **Campus-Booster ID: presenter@supinfo.com

OpenSSH: Secure Shell Course objectives By completing this course, you will: n Connect to a remote server. Secure shell access. n Setup pubkey authentication. No more passwords to remember. n Configure a ssh server. Control server settings. n Run a X11 application through a tunnel. Protect your privacy. n Forward ports. And secure the communication channel.

OpenSSH: Secure Shell Course topics Course s plan: n Remote connection. Shell access and file transfert. n Public key authentication. No more passwords! n Configuration. Client side and server side. n X Forwarding. And this is the rest of the item. n Port Forwarding.

OpenSSH: Secure Shell Remote connection Shell access and file transfert

Remote connection Open a shell The ssh command syntax: Connect to a remote host command Hostname or address to connect to Host ssh -p 22 user@hostname port Port number (optional) user Remote user you re connecting as.

Remote connection Copy files Secure Copy : Send file through the ssh tunnel. $ scp [options] source destination Options : -C Enable gzip compression -P port Connect on port -2 / -1 Force protocol version

Remote connection Copy files Local to remote scp syntax: Hostname or address to connect to command Host scp file user@hostname:/path/to/file filename Local file to send username Remote login file Remote file path

Remote connection Copy files Remote to local scp syntax: Hostname or address to connect to command Host scp user@hostname:/path/to/file file username remote login file Path to remote file filename Copy the remote file to this file / path

Remote connection Copy files FTP-like interactive session. sftp [-P] user@machine Options : -P port Connect to port Example : [root@localhost ~]#sftp bob@chaise sftp>cd / sftp>pwd Remote working directory : / sftp>get /etc/passwd /etc/passwd 100% 1989 1.9KB/s 00:00

Remote connection Stop-and-think Do you have any questions?

Remote connection Stop-and-think You want to copy a file from a remote server to the local machine. The remote ssh server is listening on port 110. Which scp switch are you going to use? -p -C -l -P -e

Remote connection Stop-and-think You want to copy a file from a remote server to the local machine. The remote ssh server is listening on port 110. Which scp switch are you going to use? -p -C -l -P -e

Remote connection Generate key pair n Public-Key cryptography n RSA or DSA n Bullet list item 1B $ ssh-keygen t rsa b 1024 f id_rsa n Create key pair in ~/.ssh/ n id_rsa (private) n id_rsa.pub (public) n Manually point (symlink) ~/.ssh/identity.pub to your pubkey

OpenSSH: Secure Shell Pubkey authentication No more passwords!

Pubkey authentication Why? Why setting using public keys? n Passwords n Hard to remember n Long to type n Insecure n Pubkey n Nothing to remember n Nothing to type n Secure as long as priv key is safe

Pubkey authentication How it works? Client login request + pubkey Server Pubkey lookup Uncypher challenge with private key Challenge cyphered with pubkey Send challenge md5 footprint Received MD5 == MD5(challenge )?

Pubkey authentication Setup Client side configuration. n Generate your key pair n Copy your pubkey to the server n ~/.ssh/authorized_keys n Manual procedure n scp && ssh n Automatic procedure n ssh-copy-id Need to have your id set

Pubkey authentication Generate key pair n Public-key cryptography n RSA or DSA n Bullet list item 1B $ ssh-keygen t rsa b 1024 f id_rsa n Create key pair in ~/.ssh/ n id_rsa (private) n id_rsa.pub (public) n Manually point (symlink) ~/.ssh/identity.pub to your pubkey

Pubkey authentication Copy your public key ssh-copy-id: Your friendly script. $ ssh-copy-id [options] user@machine Options : -I file Use file as pubkey, instead of the default.

Pubkey authentication Stop-and-think Do you have any questions?

Pubkey authentication Stop-and-think [bob@linux ~]$ ssh-copy-id john@10.1.40.2 You can now connect to 10.1.40.2 as bob without a password True False

Pubkey authentication Stop-and-think [bob@linux ~]$ ssh-copy-id john@10.1.40.2 You can now connect to 10.1.40.2 as bob without a password True False

OpenSSH: Secure Shell Configuration Client side and server side

Configuration Server Config Settings server parameters n /etc/ssh/sshd_config n Port n Protocols n Interfaces n Server keys n Authentication n Allowed/Denied users n X Fowarding n

Configuration Server Config Config example: Port 22 Protocol 2 ListenAddress 0.0.0.0 KeepAlive Yes HostKey ssh_host_dsa.key HostKey ssh_host_rsa.key PermitRootLogin no PasswordAuthentication yes PubkeyAuthentication yes PermitEmptyPasswords no X11Forwarding yes #order: DenyUsers, AllowUsers, DenyGroups, AllowGroups DenyUsers bob john Match User bill X11Forwarding no

Configuration Client Config Settings client parameters n System wide n /etc/ssh/ssh_config Default config Per host features Port Keys n Per-User n ~/.ssh/config

Configuration Client config Client config: /etc/ssh/ssh_config or ~/.ssh/config. Host * IdentifyFile ~/.ssh/id_rsa Host 192.168.1.1 Port 53 Host 192.168.1.10 Port 110 ForwardX11 no

Configuration Stop-and-think Do you have any questions?

Configuration Stop-and-think You re working with a server running ssh on port 437. You don t want to specify each time you use any sshbased tool. Which file will you modify? Which directives will you use? Host Port Listen ~/.ssh/config /etc/ssh/sshd_config

Configuration Stop-and-think You re working with a server running ssh on port 437. You don t want to specify each time you use any sshbased tool. Which file will you modify? Which directives will you use? Host Port Listen ~/.ssh/config /etc/ssh/sshd_config

OpenSSH: Secure Shell X Forwarding Secure X transport

X Forwarding About X Forwarding What s that? How to use it? n Native X feature, sshtunneled n Run remotely n Display locally n Have to be enabled n Server side n Client side n Ssh creates a DISPLAY proxy. n Nothing more to do than adding -X

X Forwarding Run a remote application Run firefox remotely, display on your screen: [user@localhost]$ ssh X bob@baracuda [bob@baracuda]$ firefox &

X Forwarding Stop-and-think Do you have any questions?

X Forwarding Stop-and-think Run remotely, display locally is a ssh feature. True False

OpenSSH: Secure Shell Port Forwarding Secure tunneling

Port Forwarding About port forwarding Network plumbing co. n Forward data through the ssh tunnel n Local port forwarding n Input on local port transported to remote port n Remote port forwarding n Incoming data on remote port is brought to the local port, courtesy of ssh.

Port Forwarding Local port forwarding ssh -L 1234:ircserver:6667 login@server

Port Forwarding Remote port forwarding ssh -R 80:localhost:80 login@server n Data incoming on port 80 on server will be available on on port 80 on localhost

Port Forwarding Stop-and-think Do you have any questions?

Port Forwarding Stop-and-think You want to redirect localhost:8080 port to 192.168.1.1:80. Which type of port forwarding will you use? Local Remote

Port Forwarding Stop-and-think You want to redirect localhost:8080 port to 192.168.1.1:80. Which type of port forwarding will you use? Local Remote

OpenSSH: Secure Shell Course summary Pubkey auth Secure shell access X Forwarding and TCP forwading File transfet Client configuration

OpenSSH: Secure Shell For more If you want to go into these subjects more deeply, Publications Courses Linux Technologies: Edge Computing SSH The Secure Shell Web sites www.supinfo.com www.labo-linux.com www.blackbeltfactory.com Conferences FOSDEM RMLL Solutions Linux

Congratulations You have successfully completed the SUPINFO course module n 21 OpenSSH: Secure Shell

OpenSSH: Secure Shell The end n Stop bothering with passwords: Use Pubkey auth. n Protected pubkeys? Use an agent