openssh

windows 10使用vscode进行远程代码开发 | tutorial to use vscode for remote development using ssh on windows

回眸只為那壹抹淺笑 提交于 2019-12-06 00:11:25
本文首发于个人博客 https://kezunlin.me/post/c93b6ba6/ ,欢迎阅读最新内容! tutorial to use vscode for remote development using ssh on windows <!--more--> Guide server sudo apt-get install openssh-server local install ssh-client on local machine. download VSCodeUserSetup-x64-1.36.1.exe from here and install. start vscode and install Remote Development extension. ctrl+shift+p and enter remote-ssh and configure for ssh. edit ~/.ssh/config Host node08 HostName 192.168.100.08 User root Host node09 HostName 192.168.100.09 User root use ssh-keygen instead of username and password copy local ~/.ssh/id_rsa.pub to remote

CentOS6、7升级Openssh至7.9

余生颓废 提交于 2019-12-05 22:37:33
出于安全考虑,定期使用Nessus对服务器进行扫描,最新Nessus提示服务器的SSH版本有漏洞,所以把SSH升级到最新版本 1、为了防止升级失败登陆不了,所以需要安装telnet mkdir /root/ssh_update yum install -y telnet-server yum install -y xinetd centos6: sed -i '/disable/s/yes/no/' /etc/xinetd.d/telnet service xinetd start 检查下23端口,证明telnet服务已经运行了 centos7: systemctl start telnet.socket systemctl start xinetd 注意: 默认情况下,系统是不允许root用户telnet远程登录的。如果要使用root用户直接登录,需设置如下内容。或者可以添加一个可以登录的用户,登录并su到root用户。 echo 'pts/0' >>/etc/securetty echo 'pts/1' >>/etc/securetty centos6: service xinetd restart centos7: systemctl restart telnet.socket 验证telnet(默认是23端口): telnet 127.0.0.1 2、检查环境

Setting the extended file attributes using SSH.NET SftpClient

安稳与你 提交于 2019-12-05 22:05:00
I am trying to use the extended file attribute to store some information after I uploaded a file into remote machine (Ubuntu 16.04 LTS) from Windows using Renci SSH.NET SFTP library. But the attributes are not getting preserved? This how I am trying to set the extended attributes SftpFileAttributes fileAttrs = sftpClient.GetAttributes(remoteFilePath); IDictionary<string, string> additionalAttrs = new Dictionary<string, string>(); additionalAttrs.Add(new KeyValuePair<string, string>("user.from", "abc")); additionalAttrs.Add(new KeyValuePair<string, string>("user.to", "xyz")); fileAttrs = new

Problems with SSH ProxyCommand

本秂侑毒 提交于 2019-12-05 21:38:54
I have some problems with the ssh proxycommand. The authentication on the proxy works fine, but when i want to login to the remote-host it fails. The problem seems to be, that the proxy tries to login with my local rsa_key and not with the key stored on the proxy. Is there a way to fix this? This is what I want: Local -- local rsa --> Proxy -- proxy rsa --> host The Config-file I use: Host 192.168.178.32 HostName 192.168.178.32 User user Port 22 IdentityFile ~/.ssh/id_rsa.pub Host 192.168.178.30 HostName 192.168.178.30 User user Port 22 IdentityFile home/user/.ssh/id_rsa.pub ProxyCommand ssh

Ubuntu配置ssh服务方便远程登陆

江枫思渺然 提交于 2019-12-05 18:54:21
SSH 安装容易、使用简单,而且比较常见,一般的Unix系统、Linux系统、FreeBSD系统都附带有支持SSH的应用程序包。ubuntu是以桌面应用为主的linux操作系统,而Ubuntu系统必须开启ssh服务后,XP或者其他的主机才可以远程登陆到 Ubuntu 系统。 在线安装 1,安装软件包,执行 sudo apt-get install openssh-server Ubuntu缺省安装了openssh-client,如果你的系统没有安装的话,再用apt-get install openssh-client安装上即可。 2,然后确认sshserver是否启动,执行 ps -e |grep ssh 如果只有ssh-agent那ssh-server还没有启动,如果看到sshd那说明ssh-server已经启动了。 3,ssh-server配置 文件位于/ etc/ssh/sshd_config,可以cat查看。可以定义SSH的服务端口,默认端口是22,也可以改成其他端口。 4,然后重启SSH服务 sudo /etc/init.d/ssh restart 这样就配置好了!XP机上选用熟悉的远程登录工具,设置Ubuntu的IP地址、开放的用户名和密码、协议是SSH2、端口22,即可。 离线安装 1、 下载安装文件 在launchpad.net/ Ubuntu

“Connection closed by [HOST IP]” using dsa key authentication

≡放荡痞女 提交于 2019-12-05 18:02:26
问题 I have a shared /home setup using Perceus Cluster Software (http://perceus.org) for our Cluster. Nodes are using CentOS 6.1 x86_64. /home is shared from the head to the nodes by nfs (NFSv4). root@head~]$ cat /etc/exports /var/lib/perceus/ 10.10.10.0/255.255.255.0(ro,no_root_squash,async) /home/ 10.10.10.0/255.255.255.0(rw,no_root_squash,no_all_squash,async) Here is the /etc/fstab on each node (all the same). ... 10.10.10.2:/var/lib/perceus/ /var/lib/perceus/ nfs ro,soft,bg 0 0 10.10.10.2:

低微漏洞处理办法记录

馋奶兔 提交于 2019-12-05 17:28:41
1.允许Traceroute探测 描述:本插件使用Traceroute探测来获取扫描器与远程主机之间的路由信息。攻击者也可以利用这些信息来了解目标网络的网络拓扑。 处理: iptables -I INPUT -p icmp --icmp-type 11 -m comment --comment "deny traceroute" -j DROP 2.ICMP timestamp请求响应漏洞 描述:远程主机会回复ICMP_TIMESTAMP查询并返回它们系统的当前时间。 这可能允许攻击者攻击一些基于时间认证的协议。 处理: iptables -I INPUT -p ICMP --icmp-type timestamp-request -m comment --comment "deny ICMP timestamp" -j DROP iptables -I INPUT -p ICMP --icmp-type timestamp-reply -m comment --comment "deny ICMP timestamp" -j DROP 3.探测到SSH服务器支持的算法 描述:本插件用来获取SSH服务器支持的算法列表 处理:无法处理。ssh协议协商过程就是服务端要返回其支持的算法列表。 4.SSH版本信息可被获取 描述:SSH服务允许远程攻击者获得ssh的具体信息,如版本号等等

redhat7 升级openssh

痴心易碎 提交于 2019-12-05 16:36:08
部署telnet,防止ssh启动失败 1、关闭防火墙或者开放23端口 2、安装启动服务,并开启root访问 yum install -y telnet-server.x86_64 yum install -y telnet.x86_64 yum install -y xinetd.x86_64 systemctl enable xinetd.service systemctl enable telnet.socket systemctl start telnet.socket systemctl start xinetd mv /etc/securetty /etc/securetty.bak 部署open-ssh #备份与卸载 mkdir /etc/ssh_oldbak/ mv /etc/ssh/* /etc/ssh_oldbak/ rpm -e `rpm -qa |grep openssh` #安装依赖 yum install -y gcc gcc-c++ glibc make autoconf openssl openssl-devel pcre-devel pam-devel yum install -y pam* zlib*#编译安装 cd openssh-7.9p1/ ./configure -prefix=/usr -sysconfdir=/etc/ssh -with

secureCRT使用阿里云生成的pem密钥

倖福魔咒の 提交于 2019-12-05 14:47:29
将密钥上传至Linux服务器,并修改权限。以文件king.pem为例: chmod 600 king.pem 修改密钥格式为OpenSSH,如果询问,留空回车: ssh-keygen -p -f king.pem 生成公钥.pub文件: ssh-keygen -e -f king.pem >> king.pem.pub 下载生成.pub文件,在使用SecrueCRT连接时指定相应pub文件即可。 来源: https://www.cnblogs.com/fanshehu/p/11929066.html

$SIG{INT}='IGNORE' not working with Net::OpenSSH

扶醉桌前 提交于 2019-12-05 14:11:51
I need to execute commands via $ssh->system in background, and it is documented that this should behave just like the local "system" command: 'As for "system" builtin, "SIGINT" and "SIGQUIT" signals are blocked. (see "system" in perlfunc).' Actually, this does not seem to be true, as $ssh->system in a child is immediately terminated when SIGINT is received, even when I explicitly want to "IGNORE" it first: use warnings; use strict; use POSIX ":sys_wait_h"; use Net::OpenSSH; my $CTRLC=0; $SIG{CHLD}='IGNORE'; sub _int_handler { $CTRLC++; print "CTRL-C was pressed $CTRLC times!!!\n"; } $SIG{INT}=