ssh配置与使用

Git配置SSH公钥 而用户的 key 则是针对用户的,用户添加了 key 就对用户名下的仓库和用户参加了的仓库具有权限,一般而言,用户的key具有推送和拉取的权限,而仓库的 key 则只具有拉取权限。仓库的 sshkey 只针对仓库,且我们仅对仓库提供了部署公钥,即仓库下的公钥仅能拉取仓库,这通常用于生产服务器拉取仓库的代码。Gitee 提供了基于 SSH 协议的 Git 服务,在使用 SSH 协议访问仓库仓库之前,需要先配置好账户 SSH 公钥。和仓库"只读"权限的 SSH Key 相比,账户的 SSH Key 同时具备。 阅读详情
########################
####9.openssh-server####
########################


1.openssh-server

功能:让远程主机可以通过网络访问sshd服务,开始一个安全shell


2.客户端连接方式

ssh 远程主机用户@远程主机ip


[root@desktop0 ~]# ssh root@172.25.254.105
The authenticity of host '172.25.254.105 (172.25.254.105)' can't be established.
ECDSA key fingerprint is eb:24:0e:07:96:26:b1:04:c2:37:0c:78:2d:bc:b0:08.
Are you sure you want to continue connecting (yes/no)? yes##连接陌生主机时需要建立认证关系
Warning: Permanently added '172.25.0.11' (ECDSA) to the list of known hosts.
root@172.25.0.11's password: ##远程用户密码
Last login:Thu Jul 20 08:13:00 2017
[root@server0 ~]# ##登陆成功

注:目前连接的远程主机不能打开图形


ssh 远程主机用户@远程主机ip -X ##调用远程主机图形工具


ssh     远程主机用户@远程主机ip command##直接在远程主机运行某条命令








3.sshkey加密
生成公钥私钥
[root@server0 ~]# ssh-keygen ##生成公钥私钥工具

[root@server0 ~]# ls /root/.ssh/

id_rsa  id_rsa.pub
id_rsa ##私钥,就是钥匙
id_rsa.pub ##公钥,就是锁


添加key认证方式

[root@server0 ~]# ssh-copy-id -i /root/.ssh/id_rsa.pub  root@localhost

ssh-copy-id ##添加key认证方式的工具
-i ##指定加密key文件
/root/.ssh/id_rsa.pub##加密key
root ##加密用户为root
loaclhost ##被加密主机ip或本机名称


分发钥匙给client主机

[root@lockhost Desktop]# scp /root/.ssh/id_rsa root@172.25.254.205:/root/.ssh/



4.测试

通过id_rsa直接连接不需要输入用户密码





4.提升openssh的安全级别
openssh-server配置文件

/etc/ssh/sshd_config

78 PasswordAuthentication yes|no##是否开启用户密码认证,yes为支持no为关闭


48 PermitRootLogin yes|no##是否允许超级用户登陆

49 AllowUsers student westos##用户白名单,只有在名单中出现的用户可以使用sshd建立shell
50 DenyUsers westos##用户黑名单


控制ssh客户端访问

vim /etc/hosts.deny

sshd:ALL ##拒绝所有人链接sshd服务


vim /etc/hosts.allow
sshd:172.25.254.250##允许250主机链接sshd


sshd:172.25.254.250, 172.25.254.180##允许250和180链接


sshd:ALL EXCEPT 172.25.254.200##只不允许200链接sshd




ssh登陆提示修改该
vim /etc/motd ##显示登陆后字符

hello world ##在登陆后就会显示这个字符































H3C配置ssh 当连接PC和交换机时,请先安装配置电缆的DB-9端到PC机,再连接RJ-45到交换机;在拆下时,先拔出RJ-45端,再拔下DB-9端。(1)虽然一个客户端只会采用DSA和RSA公共密钥算法中的一种来认证服务器,但是由于不同客户端支持的公共密钥算法不同,为了确保客户端能够成功登录服务器,建议在服务器上生成DSA和RSA两种密钥对。如果在该用户界面上配置支持的协议是SSH,为确保登录成功,请务必配置登录用户界面的认证方式为authentication-mode scheme(采用AAA认证)。 阅读详情

相关推荐

工具使用之Github的SSH配置

0 概述Git是分布式的代码管理工具,远程的代码管理是基于SSH的,所以要使用远程的Git则需要SSH的配置。1 相关链接如何生成SSH key如何生成SSH key2 设置Git的user name和email$ git config --global user.name "xuhaiyan" $ git config --global user.email "haiyan.xu.vip@gmai

chenliguan的博客 1767

如何为root帐号开启SSH登录

以下内容源于网络资源的学习与整理,如有侵权请告知删除。1、在虚拟机ubuntu中以root用户登录。2、修改/etc/ssh/sshd_config文件内容,将“PermitRootLogin without-password”注释掉,添加“PermitRootLogin yes”。 3、重启ssh服务。...

主要记录嵌入式学习与开发过程。 7096

gitlab git ssh 配置多个帐户-不同git仓库使用不用的ssh key

gitlab git ssh 配置多个帐户-不同git仓库使用不用的ssh key 生成 ssh - key manager@mobile:~/.ssh$ ssh-keygen -t rsa -C "yangxx@gmail.com" Generating public/private rsa key pair. Enter file in which to save the key (/h...

满地星辰的博客 5086

python实现远程ssh登录

python登录ssh

锅锅的博客 6016

建立SSH连接的Python实现方法

通过Paramiko库,我们可以方便地使用Python建立SSH连接并执行各种操作。无论是执行命令还是传输文件,Paramiko提供了丰富的功能和灵活的接口,使得SSH操作变得简单而高效。接下来,我们将使用Paramiko库中的SSHClient类来建立SSH连接。除了执行命令,Paramiko还提供了其他功能,如上传和下载文件,建立交互式会话等。在上面的代码中,我们首先创建了一个SSHClient对象,并连接到远程主机。方法连接到远程主机,需要提供远程主机的地址、用户名和密码。方法关闭SSH连接。

uote_e的博客 790

GitLab上配置SSH Key

一、准备内容 ①具有GitLab的账号 ②Windows电脑下载Git工具:Download Git for Windows 二、GitLab配置SSH步骤 2.1、下载Git工具且安装 Git工具下载地址https://git-scm.com/ 2.2、创建SSH密钥 ①打开gitbash后输入生成密钥的命令【ssh-keygen】 ②查看SSH Key生成的文件 ③登录到您的GitLab帐户,然后点击右上角的账号,选择【Preferences】-->【SSH K...

提供C#相关开发 、云计算、运维测试、网络安全相关技术分享与服务,有意向可联系。 3万+

使用python连接ssh服务器

2.安装paramiko,在python script目录下cmd执行pip命令安装豆瓣的paramiko源文件。1.paramiko包存在依赖,需要先安装pycrypto。通过paramiko包里的sshconnect方法来实现。

qq_44534541的博客 4554

SIMULIA-Simpack 2022x新功能介绍

增加库伦摩擦类型力元95 Coulomb Friction增加了3种新的摩擦方向类型用于模拟平面、圆柱和球面摩擦。针对平移和旋转摩擦改进了滑动到粘着过渡阶段的检测,增加一个参数定义两种不同的滑移-粘滞过渡模式,即“Unloaded stick stiffness”和“Preload stick with last slip”。新增加124'Applied Load’力元允许用户将力或扭矩作为恒定值或通过激励元素施加到To Marker点上。该力元建模操作方便,效率高。支持线性柔性体装配。

crystalzhan的博客 1047

思科SSH配置

R1(config)#hostname R1 //配置ssh的时候路由器的名字不能为router R1(config)#aaa new-model //默认是no aaa new-model, 如果配置为aaa new-model,line vty就不需要配置login local R1(config)#ip domain-name cisco //SSH的关键字名就是hostnam...

junlan的博客 2万+

fMRI独立成分分析方法(ICA)工具GIFT

详细介绍了进行fmri数据进行ICA分析的工具包GIFT的使用,和进行ICA分析的流程。

m0_58256026的博客 1万+

保姆级教程:用YOLOv5s训练PCB缺陷检测模型(附北大公开数据集)

本文提供了一份基于YOLOv5s的PCB缺陷检测模型从零开始的完整实战教程。详细解析了如何使用北大公开数据集,涵盖环境搭建、数据处理、模型训练、性能评估及优化部署全流程,并针对工业场景中常见的类别不均衡问题给出了具体解决方案,旨在帮助开发者快速构建高精度的自动化质检系统。

weixin_28285943的博客 308

TortoiseGit使用配置 SSH key配置

1、前提 Git已经安装且配置好可以正常使用,后来又安装了TortoiseGit 2、常规设置 Git路径:是你安装的Git的实际路径 3、凭证 4、网络 这里要注意,默认是TortoiseGit的路径,要改成Git的路径下的。 5.Tortoisegit 的SSH Key配置示例 如果需要克隆一个项目(分别从github仓库、自己搭建的gitblit 仓库上获取),那就需要配置SSH Key 补充一个知识点: 本地仓库和远程git仓库的连接方式有两种:HTTPS 和 SSH,很多时候都是直接使用

一梦晓三生的博客 2370

可控异常的契约化设计:在 ABAP 中用 CX_STATIC_CHECK 把可预期错误变成接口的一部分

文章摘要: 本文探讨了ABAP系统中异常处理的工程化设计原则,强调将可预期的业务异常作为接口契约的一部分。核心观点是:对于调用方能够合理处理的错误情况,应使用继承自CX_STATIC_CHECK的受检异常,通过方法签名强制调用方处理或显式转发。文章对比了ABAP三大异常根类的适用场景,提出"三问法"判断异常是否适合受检处理,并给出了包含上下文信息的异常类实现示例。通过Fiori文件上传案例,展示了如何在分层架构中合理传递和转换异常,最终在OData服务层将业务异常映射为标准错误响应。这种

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 3073

SSH服务配置

SSH(Secure Shell)是一种安全通道协议,主要用来实现字符界面的远程登录、远程 复制等功能。SSH 协议对通信双方的数据传输进行了加密处理,其中包括用户登录时输入的用户口令,SSH 为建立在应用层和传输层基础上的安全协议。对数据进行压缩,加快传输速度。SSH客户端SSH服务端优点:数据传输是加密的,可以防止信息泄漏数据传输是压缩的,可以提高传输速度。

Liqi23的博客 1万+

EtherCAT主站SOEM -- 19 --Qt-Soem通过CSP模式(周期同步位置模式)控制一个电机转圈圈

以上就是EtherCAT主站SOEM – 19 --Qt-Soem通过CSP模式(周期同步位置模式)控制一个电机转圈圈的内容。有不明白的地方欢迎留言;有建议欢迎留言,我后面编写文档好改进。创作不容,如果文档对您有帮助,记得给个赞。

常驻客栈的博客--嵌入式EtherCAT 1998

《电磁兼容设计》专栏说明

本专栏自2024年1月起开始更新,仅设此一个电磁兼容相关知识专栏,并将一直持续更新下去,无期限

linkking27的博客 794

Gerrit SSH 配置使用

Gerrit配置使用 获取账号密码 生成ssh密钥对 (1) 确认是否已经有密钥对 ls ~/ssh (2) 密钥对重新生成步骤 在linux系统终端执行: ssh-keygen -t rsa -C "xxx@xxx.com" Gerrit网页配置 获取公钥 cat ~/.ssh/id_rsa.pub 登录Gerrit, Settings -> SSH Public Key -> Add Key 本地环境配置 (1) 查看配置 git config --global --li

OohYaYaXXXXD的博客 3216

高通拨号流程介绍

本文介绍了高通平台(如SDX55)中APSS(A7处理器)与ModEM(Q6处理器)间的通信机制。

四儿家的小祖宗的博客 1068

SSH从原理到配置

远程连接服务器 SSH原理 SSH配置

暖风吹起云之博客 1756

详细介绍用MATLAB实现基于A*算法的路径规划(附完整的代码,代码逐行进行解释)(一)--------A*算法简介和环境的创建

   本系列文章主要介绍基于A*算法的路径规划的实现,并使用MATLAB进行仿真演示。    一、 A*算法简介       A*(A-Star)算法是一种静态路网中求解最短路径最有效的直接搜索方法,也是解决许多搜索问题的有效算法。算法中的距离估算值与实际值越接近,最终搜索速度越快。      公式表示为: f(n)=g(n)+h(n),其中, f(n) 是从初始状态经由状态n到目标状态的代价估计,g(n) 是在状态空间中从初始状态到状态n的实际代价,h(n) 是从状态n到目标状态的最佳路径的估计代价。

慕羽★的博客 7万+

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

ssh 配置

ssh 配置

qq_42880714的博客 1462

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

github配置ssh连接

github配置ssh连接

牛牛博士博客 4516

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

计算机控制技术及应用

《计算机控制技术及应用》通过总结作者的科研成果和吸收国内外的先进理论、方法和技术,以计算机控制系统的网络化、开放化、智能化和集成化发展趋势为主线索,主要介绍计算机控制系统的基本概念和计算机控制系统的典型形式,计算机控制系统的数学描述与基本分析方法,以及数字PID控制器、最少拍控制系统、达林算法、状态变量设计法等设计方法及其各种改进算法。重点突出计算机控制系统输入输出通道接口的设计方法和典型控制系统的设计案例与实现方法等。

jenkins配置ssh服务器&配置ssh servers

jenkins配置ssh服务器&配置ssh servers

qq_31564573的博客 2万+

SSH部署与配置

SSH(Secure Shell)是一种基于加密的网络协议,为Linux系统提供了安全且高效的远程访问方式。通过合理配置和使用SSH,管理员不仅能够远程管理服务器、传输文件,还能确保通信内容的机密性和完整性。本文将深入探讨Linux中SSH的配置与安全,并结合详实的示例代码,帮助管理员全面掌握并灵活运用SSH技术。

a3314019530的博客 900

Mac下SSH使用与配置

SSH使用与配置 github上传与登入 carthage使用要先用SSH

u012297622的博客 4万+
上一篇: linux系统服务
下一篇: 日志同步与时间同步
python_bobo
博客等级 码龄9年 15粉丝 45原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值