LINUX-SSH Connectivity Issues

Source: Internet
Author: User
Tags diff

 SSH Connection mode
Ssh-p [email protected] # from Linux SSH login to another linux ssh-p [email protected] CMD # using SSH to operate the remote host scp-p 22 file [email protected]:/directory # Copy the local file to the remote host Sshpass -P ' password ' ssh-n [email protected] $IP "echo Hello" # Specify password remote operation Ssh-o Stricthostkeychecking=no $IP # SSH connection does not prompt yesssh-t "Su-" # Specify pseudo Terminal client to work in interactive mode SCP [email protected]: Remote directory Local Directory # Copy the remote specified file to the local ssh-n-l2001:remotehost:80 [email protected] # Create a port forwarding channel with SSH ssh-t host_a SSH host_b # nested using Sshssh-t-P [email protected] $Ip/bin/su-root-c {$CMD}; # remote SU execution command cmd= "\"/sbin/ifconfig eth0\ "" ssh-keygen-t RSA # Generate key Ssh-copy-id -I [email protected] # transfer Keyvi $HOME/.ssh/authorized_keys # Public key storage location SSHFS [email protected]:/path/to/folder/path/to/mount/point # mount the folder on the remote host via SSH fusermount-u/path/to/mount/point # Uninstall the SSH mount Directory ssh [email protected] cat/path/to/remotefile | Diff/path/to/localfile-# Use diff to compare remote files with local files su-user-c "ssh [email protected] \" Echo-e AA |mail-s Test [email protected]\ "" # Toggle user logon remote Send mail

SSH Reverse Connection

# External Network A to control the intranet BSSH-NFR 1234:localhost:2223 [email protected]-p22    
# Bind the 1234 port of host A to the 2223 port of Host B, which is equivalent to the remote port mapping
Ss-ant # At this time on a host sshd will LISTEN local 1234 Port # LISTEN 0 127.0.0.1:1234 *:*
SSH localhost-p1234
# on a host connection local 1234 port

  

LINUX-SSH Connectivity Issues

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.