What are all Common use of SSH for UNIX and Linux systems

SSH Common for UNIX and Linux systems

User can typically use SSH to allow users to log in to a remote host and execute commands. However, SSH also supports tunneling and X11 connections. It can even transfer files using SFTP or SCP. SSH is applicable for numerous applications within most common platforms, including Linux, UNIX, Windows, and Apple OS X, although some applications may require features that are only available or compatible with specific SSH clients or servers.
Here are a few common SSH syntax examples:
1. Remote host shell access which supersedes telnet and rlogin clear text, insecure protocols:
# ssh user@example.com
[user@example.com] ~

2. Executing a single command on a remote host which replacing rsh:
# ssh root@example.com reboot
root@example.com's password: ******

3. Copying files from a local server to a remote host by way of the SCP command:
root@edb-01.example.com's password: ******
file1.txt 100% 0 0.0KB/s 00:00
file2.txt 100% 0 0.0KB/s 00:00

4. In Combination with SFTP, as a secure substitute to FTP file transfer:
sftp fsmythe@example.com
Connecting to example.com...
user@example.com's password: *******

5. In combination with rsync to back up, copy, and mirror files efficiently and securely to a local or remote host:
# rsync -avul --rsh=ssh /opt/edbdata/ root@example.com:/root/backup/
root@example.com's password: ******
building file list ... done

sent 982813 bytes received 2116 bytes 1374860.38 bytes/sec
total size is 982138 speedup is 1.00

6. Port forwarding or tunneling a port not to be confused with a VPN:
ssh -L 8000:mailserver:110 example.com fsmythe@example.com's password: ********

7. Forwarding X sessions from a remote host possible through multiple intermediate hosts:
Edit /etc/ssh/sshd_config and change 2 keywords :
AllowTcpForwarding yes
X11Forwarding yes
# service sshd restart
$ export DISPLAY
$ ssh -X user@example.com </b>

8. With the <b>X11 forwarding configuration</b> in conjunction with an X Windows client with SSH X11 tunneling to allow for the implementation of a UNIX or Linux GUI subsystem run over SSH securely on the same Windows machine host that is the source for the SSH session to the Linux or UNIX remote host:
<code>ssh -ND 8000 fsmythe@example.com
Browser Settings, goto 'Manual Proxy Configuration' set "SOCKS Host" to example.com,
the 'Port to 8000' , Enable SOCKS v5, and lastly set 'No Proxy for' field
to 'localhost,'

9. Securely mounting a directory on a remote server as a file system on a local computer using sshfs:
# yum install sshfs fuse-utils (Install sshfs and fuse-utils)
$sshfs example.com:/remote_dir /mnt/local_dir

10. Automated remote host monitoring and management of servers through one or more mechanism:
Report number of apache processes running on the remote server example.com:
$ ssh example.com ps -ef | grep httpd | wc -l
root@example.com's password: *****

Related Topic How to Download File command Line
How to Check JDK Version
Basic Linux Commands
How to Setup Apache 2 HTTPS web Server Configuration
List of Server Ports and their Assigned Numbers

nScraps.com 2011   Privacy Policy  Terms of Service  Feedback