Linux的SSH(Secure Shell Protocol)服务
在数据传输前,SSH会对需要传输的数据进行加密,保证会话安全与会话中传输数据的安全,SSH客户端还包含一个远程拷贝scp。
1、SSH的结构
SSH服务由服务端软件(openssh)和客户端(SSH、SecureCRT、Xshell)组成,SSH默认使用22端口,SSH服务端是一个守护进程,在后台时刻监听客户端的请求,sshd就是SSH服务端的进程名
补充:(守护进程)
守护进程是一个在后台运行并且不受任何终端控制的进程。Unix操作系统有很多典型的守护进程(其数目根据需要或20—50不等),它们在后台运行,执行不同的管理任务。
用户使守护进程独立于所有终端是因为,在守护进程从一个终端启动的情况下,这同一个终端可能被其他的用户使用。例如,用户从一个终端启动守护进程后退出,然后另外一个人也登录到这个终端。用户不希望后者在使用该终端的过程中,接收到守护进程的任何错误信息。同样,由终端键人的任何信号(例如中断信号)也不应该影响先前在该终端启动的任何守护进程的运行。虽然让服务器后台运行很容易(只要shell命令行以&结尾即可),但用户还应该做些工作,让程序本身能够自动进入后台,且不依赖于任何终端。
守护进程没有控制终端,因此当某些情况发生时,不管是一般的报告性信息,还是需由管理员处理的紧急信息,都需要以某种方式输出。Syslog 函数就是输出这些信息的标准方法,它把信息发送给 syslogd 守护进程。
2、SSH认证类型
(1)基于口令的安全验证,也就是通常所说的账号、密码、端口、IP登录
(2)基于密钥的安全验证
事先建立一对密钥对,然后将公用的密钥放在服务端,把私有的密钥放在SSH的客户端,最终通过这种密钥验证方式进行加密传输数据。

3、SCP
NAME
scp - secure copy (remote file copy program) #安全拷贝 SYNOPSIS
scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
[-l limit] [-o ssh_option] [-P port] [-S program]
[[user@]host1:]file1 ... [[user@]host2:]file2 DESCRIPTION
scp copies files between hosts on a network.(scp是在网络上通过host之间拷贝文件) It uses ssh() for
data transfer, and uses the same authentication and provides the
same security as ssh(). Unlike rcp(), scp will ask for pass-
words or passphrases if they are needed for authentication. File names may contain a user and host specification to indicate
that the file is to be copied to/from that host. Local file
names can be made explicit using absolute or relative pathnames
to avoid scp treating file names containing ‘:’ as host speci-
fiers. Copies between two remote hosts are also permitted. When copying a source file to a target file which already exists,
scp will replace the contents of the target file (keeping the
inode). If the target file does not yet exist, an empty file with the
target file name is created, then filled with the source file
contents. No attempt is made at "near-atomic" transfer using
temporary files.
-P 端口
-p 保持属性
-r 拷贝目录


4、FTP功能服务sftp
上传:
[root@localhost tmp]# sftp -oport= root@192.168.181.129
Connecting to 192.168.181.129...
root@192.168.181.129's password:
sftp> put /tmp/ /tmp
stat /tmp/: No such file or directory
sftp> put /tmp/.txt /tmp
Uploading /tmp/.txt to /tmp/.txt
/tmp/.txt % .0KB/s :

查看上传成功!
下载:
sftp> get /tmp/ /tmp
Fetching /tmp/ to /tmp/
sftp> get /tmp/ /opt
Fetching /tmp/ to /opt/

检查下载到本地成功!
Linux的SSH(Secure Shell Protocol)服务的更多相关文章
- Linux学习笔记二:Ubuntu安装SSH(Secure Shell)服务
Ubuntu默认是没有安装SSH(Secure Shell)服务,如果想要通过ssh链接到Ubuntu,我们需要手动安装ssh-server. SSH分客户端ssh-client,服务端ssh-ser ...
- VNCServer,SSH Secure Shell Client,window远程控制linux
1.VNC远程连接linux图形化桌面 2.SSH Secure Shell Client连接linux终端 3.设置FTP与linux传输文件 1.VNC远程连接linux图形化桌面 在centos ...
- 利用SSH secure Shell实现windows与linux之间传输文件
在windows下安装SSH secure Shell.默认安装后有两个快捷方式. linux下需要安装openssh-server utuntu默认安装了opens是-client,所以不需要安装, ...
- SSH Secure Shell Client连接Linux 命令行显示中文乱码问题 和oracle 查询数据中文乱码问题
一.SSH Secure Shell Client连接Linux 命令行显示中文乱码问题 linux 设置系统语言 修改 /etc/sysconfig/i18n 文件,如 LANG="en_ ...
- SSH secure shell 权威指南(转载)
本书是一本介绍通信安全的书籍,如果你想保障你的通信安全,本书能给你一个很好的解决方案.本书从ssh协议介绍起,到具体的开源实现和商业实现.但本书同时介绍开源实现和商业实现,给人感觉比较乱.注意:由于o ...
- SSH Secure Shell Client安装和使用
SSH是一个用来替代TELNET.FTP以及R命令的工具包,主要是想解决口令在网上明文传输的问题.为了系统安全和用户自身的 权益,推广SSH是必要的. SSH是英文Secure Shell的简写形式. ...
- SSH Secure Shell 无法登录:server responded "algorithm negotiation failed”
SSH Secure Shell Client 连接 ubuntu系统报错 修改ssh的配置文件 /etc/ssh/sshd_config在配置文件中添加: Ciphers aes128-cbc,ae ...
- ssh secure shell
ssh secure shell 和securecrt xhell一样,都是终端工具
- SSH Secure Shell Client的windows客户端样式设置
SSH Secure Shell Client下载:http://pan.baidu.com/s/1dF2lDdf 其他工具(putty-0.67)下载:http://pan.baidu.com/s/ ...
- SSH Secure Shell Client最新版,解决Win10不兼容问题
SSH的工具很多,像XShell,SecureCRT等等. 不过我一直用的是:SSH Secure Shell Client 主要的原因就是: 软件本身带文件浏览的功能,可以通过拖拽去实现文件上传和下 ...
随机推荐
- 并发编程之五--ThreadLocal
ThreadLocal是什么 早在JDK 1.2的版本中就提供java.lang.ThreadLocal,ThreadLocal为解决多线程程序的并发问题提供了一种新的思路.使用这个工具类可以很简洁地 ...
- [置顶]
都是类型惹的祸——小心unsigned
正如我们所知道的,编程语句都有很多的基本数据类型,如char,inf,float等等,而在C和C++中还有一个特殊的类型就是无符号数,它由unsigned修饰,如unsigned int等.大家有没想 ...
- 问题:table 可否实现对角线;结果:用div+css模拟表格对角线
首先声明: 这只是探讨一种CSS模拟表格对角线的用法,实际在工作中可能觉得这样做有点小题大作,这不是本主题讨论的重点.如果对此深以为然的朋友,请一笑过之... 有时在插入文档时,要用到表格对角线,常见 ...
- javascript删除option选项的多种方法总结
转自:https://blog.csdn.net/xiaoxuanyunmeng/article/details/16886505 1. JavaScript 代码如下: var oSel=docum ...
- doker 笔记(1) 架构
Docker 的核心组件包括: Docker 客户端 - Client Docker 服务器 - Docker daemon Docker 镜像 - Image Registry Docker 容器 ...
- 解决html中的乱码问题
1.最简单粗暴的方法就是加一个meta标签,不过值得我们注意的是我们的meta标签是与我们的head标签是同一级的,所以千万不能将meta标签加到我们的head标签中. <meta http-e ...
- 第2章 netty介绍与相关基础知识
NIO有一个零拷贝的特性.Java的内存有分为堆和栈,以及还有字符串常量池等等.如果有一些数据需要从IO里面读取并且放到堆里面,中间其实会经过一些缓冲区.我们要去读,它会分成两个步骤,第一块它会把我们 ...
- POJ 1187 陨石的秘密 (线性DP)
题意: 公元11380年,一颗巨大的陨石坠落在南极.于是,灾难降临了,地球上出现了一系列反常的现象.当人们焦急万分的时候,一支中国科学家组成的南极考察队赶到了出事地点.经过一番侦察,科学家们发现陨石上 ...
- 20行核心代码:jQuery实现省市二级联动
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...
- 算法Sedgewick第四版-第1章基础-2.1Elementary Sortss-006归并排序(Mergesort)
一. 1.特点 (1)merge-sort : to sort an array, divide it into two halves, sort the two halves (recursivel ...