putty for ubuntu,ubuntu终端

大家好,如果您还对putty for ubuntu不太了解,没有关系,今天就由本站为大家分享putty for ubuntu的知识,包括ubuntu终端的问题都会给大家分析到,还望可以解决大家的问题,下面我们就开始吧!

配置Ubuntu 18.04的串口终端并用PuTTY连接

配置Ubuntu 18.04的串口终端并用PuTTY连接,实现在一台Windows电脑上控制没有显示屏或SSH连接的Ubuntu电脑。

步骤一:购买串口线

如果Ubuntu电脑自带串口,确认其外观形状。如没有串口,需购买USB-串口转换线,确保选择常见型号的内部转换芯片,以便于驱动安装。

步骤二:配置USB串口转换线驱动

访问FTDI官网下载适用于Windows操作系统的免费驱动。下载Windows的二进制安装包,并安装。

步骤三:插入转换线与识别设备

插入USB-串口转换线后,通过设备管理器检查新添加的USB设备和串口设备(如COM11)。

步骤四:配置PuTTY

下载并安装PuTTY,打开后选择Serial连接,输入COM端口号(如COM11),设置波特率为115200。保存设置并打开连接。

步骤五:配置Ubuntu 18.04的串口终端

在Ubuntu端,确认串口编号,安装setserial,运行命令检查当前串口状态。编辑grub配置文件,添加或修改相关参数以启用串口终端。重启Ubuntu,打开PuTTY窗口,即可实现与Ubuntu的连接。

最终步骤:实现控制

几分钟后,Ubuntu电脑重启,通过PuTTY窗口显示grub启动页面。启动Ubuntu后,登录并进入熟悉的Bash终端,完成控制Ubuntu电脑的配置过程。

如何在 Ubuntu 和其他 Linux 发行版上安装 Putty

在IT领域,尤其是开发环境中,经常需要在远程Linux系统上工作,而本地系统为Windows。在这种情况下,Putty成为了连接Windows与Linux系统的首选SSH客户端。

虽然Putty最初是为了Windows用户设计的,但它同样可以在Linux和其他操作系统上运行,作为一款开源软件,它为用户提供了便利。

对于Ubuntu用户,Putty可以在universe仓库中找到,可以通过启用该仓库并执行更新命令来安装。安装后,可以在菜单中找到并启动Putty。其Linux版本与Windows版本相仿,使用起来既方便又熟悉。

安装步骤如下:首先启用universe仓库,更新Ubuntu;然后执行安装命令。输入远程系统主机名或IP地址并连接后,Putty将使用已保存在主目录中的SSH密钥。

除了Ubuntu,其他Linux发行版如Debian、Fedora/Red Hat和基于Arch Linux的发行版同样可以轻松安装Putty,通常使用各自的包管理器即可完成。

虽然原生Linux终端如GNOME终端或Terminator可能更适合某些用户,但Putty作为SSH客户端在Linux系统中同样具备实用性。在管理多个SSH连接时,选择使用默认终端或Putty完全取决于个人喜好。

总结而言,不管选择使用原生Linux终端还是Putty,关键在于它们能够满足不同用户的连接需求,为远程Linux系统工作提供便利。在Linux中使用Putty的用户可以享受其与Windows版本相似的界面和高效连接功能,为跨平台协作带来无缝体验。

ubuntu修改了ssh配置后 putty 还是出现access denied

你可以从以下几点查看实验下。

首先,先备份一下配置文件。

mkdir~/backup

cp/etc/ssh/ssh_config~/backup/ssh_config

第二步,编辑文件:

vi/etc/ssh/ssh_config

使用“/”搜搜看下Allow/Deny开头的项目,全部注释掉。(我查看了下,有些文章说AllowUsers参数会限制访问用户,需要在后面添加root,才能使用root账户ssh登陆,但我在我的centos7的ssh_config文件中未看到此参数,虽然有一些其他Allow\Deny开头的参数,不过全部都是被注释状态。可以参考最后我的sshd_config文件。)

修改完成后,重启服务/etc/init.d/ssh start(参考的百度出来的文章结果,我实际实验结果是:守护进程里并没有ssh,无法运行此命令,chkconfig里也没有sshd进程,service也无法重启ssh,所以我直接reboot了系统)

如果,依然不行进行下一步。

第三步,同网段内其他windows主机打开cmd,查看主机ssh端口(如果修改了默认端口,得自行把22修改为正确端口)是否正常。

win+r,输入cmd

ping(ubuntu主机IP地址)#首先要保证网络通

telnet(ubuntu主机IP地址)22#查看端口是否通

如果正常,应该显示类似“SSH-2.0-OpenSSH_6.6.1”的消息,或者是纯黑屏,再次点击回车断开连接。

第四步,如果上一步显示不正常,可能是防火墙设置问题,关闭或设置防火墙

ufw disable(方法一:关闭防火墙)

ufw allow 22/tcp(方法二:打开端口22)

(注:我用的centos采用的是最小化安装,未安装防火墙,这一步骤是我参考的网上资料,未进行实验。具体可自行百度。)

最后附上我的ssh_config文件。

#$OpenBSD:sshd_config,v1.932014/01/1005:59:19djmExp$

#Thisisthesshdserversystem-wideconfigurationfile.See

#sshd_config(5)formoreinformation.

#ThissshdwascompiledwithPATH=/usr/local/bin:/usr/bin

#Thestrategyusedforoptionsinthedefaultsshd_configshippedwith

#OpenSSHistospecifyoptionswiththeirdefaultvaluewhere

#possible,butleavethemcommented.Uncommentedoptionsoverridethe

#defaultvalue.

#IfyouwanttochangetheportonaSELinuxsystem,youhavetotell

#SELinuxaboutthischange.

#semanageport-a-tssh_port_t-ptcp#PORTNUMBER

#

#Port22

#AddressFamilyany

#ListenAddress0.0.0.0

#ListenAddress::

#Thedefaultrequiresexplicitactivationofprotocol1

#Protocol2

#HostKeyforprotocolversion1

#HostKey/etc/ssh/ssh_host_key

#HostKeysforprotocolversion2

HostKey/etc/ssh/ssh_host_rsa_key

#HostKey/etc/ssh/ssh_host_dsa_key

HostKey/etc/ssh/ssh_host_ecdsa_key

HostKey/etc/ssh/ssh_host_ed25519_key

#Lifetimeandsizeofephemeralversion1serverkey

#KeyRegenerationInterval1h

#ServerKeyBits1024

#Ciphersandkeying

#RekeyLimitdefaultnone

#Logging

#obsoletesQuietModeandFascistLogging

#SyslogFacilityAUTH

SyslogFacilityAUTHPRIV

#LogLevelINFO

#Authentication:

#LoginGraceTime2m

#PermitRootLoginyes

#StrictModesyes

#MaxAuthTries6

#MaxSessions10

#RSAAuthenticationyes

#PubkeyAuthenticationyes

#Thedefaultistocheckboth.ssh/authorized_keysand.ssh/authorized_keys2

#butthisisoverriddensoinstallationswillonlycheck.ssh/authorized_keys

AuthorizedKeysFile.ssh/authorized_keys

#AuthorizedPrincipalsFilenone

#AuthorizedKeysCommandnone

#AuthorizedKeysCommandUsernobody

#Forthistoworkyouwillalsoneedhostkeysin/etc/ssh/ssh_known_hosts

#RhostsRSAAuthenticationno

#similarforprotocolversion2

#HostbasedAuthenticationno

#Changetoyesifyoudon'ttrust~/.ssh/known_hostsfor

#RhostsRSAAuthenticationandHostbasedAuthentication

#IgnoreUserKnownHostsno

#Don'treadtheuser's~/.rhostsand~/.shostsfiles

#IgnoreRhostsyes

#Todisabletunneledcleartextpasswords,changetonohere!

#PasswordAuthenticationyes

#PermitEmptyPasswordsno

PasswordAuthenticationyes

#Changetonotodisables/keypasswords

#ChallengeResponseAuthenticationyes

ChallengeResponseAuthenticationno

#Kerberosoptions

#KerberosAuthenticationno

#KerberosOrLocalPasswdyes

#KerberosTicketCleanupyes

#KerberosGetAFSTokenno

#KerberosUseKuserokyes

#GSSAPIoptions

GSSAPIAuthenticationyes

GSSAPICleanupCredentialsno

#GSSAPIStrictAcceptorCheckyes

#GSSAPIKeyExchangeno

#GSSAPIEnablek5usersno

#Setthisto'yes'toenablePAMauthentication,accountprocessing,

#andsessionprocessing.Ifthisisenabled,PAMauthenticationwill

#beallowedthroughtheChallengeResponseAuthenticationand

#PasswordAuthentication.DependingonyourPAMconfiguration,

#PAMauthenticationviaChallengeResponseAuthenticationmaybypass

#thesettingof"PermitRootLoginwithout-password".

#IfyoujustwantthePAMaccountandsessioncheckstorunwithout

#PAMauthentication,thenenablethisbutsetPasswordAuthentication

#andChallengeResponseAuthenticationto'no'.

#WARNING:'UsePAMno'isnotsupportedinRedHatEnterpriseLinuxandmaycauseseveral

#problems.

UsePAMyes

#AllowAgentForwardingyes

#AllowTcpForwardingyes

#GatewayPortsno

X11Forwardingyes

#X11DisplayOffset10

#X11UseLocalhostyes

#PermitTTYyes

#PrintMotdyes

#PrintLastLogyes

#TCPKeepAliveyes

#UseLoginno

UsePrivilegeSeparationsandbox#Defaultfornewinstallations.

#PermitUserEnvironmentno

#Compressiondelayed

#ClientAliveInterval0

#ClientAliveCountMax3

#ShowPatchLevelno

#UseDNSyes

#PidFile/var/run/sshd.pid

#MaxStartups10:30:100

#PermitTunnelno

#ChrootDirectorynone

#VersionAddendumnone

#nodefaultbannerpath

#Bannernone

#Acceptlocale-relatedenvironmentvariables

AcceptEnvLANGLC_CTYPELC_NUMERICLC_TIMELC_COLLATELC_MONETARYLC_MESSAGES

AcceptEnvLC_PAPERLC_NAMELC_ADDRESSLC_TELEPHONELC_MEASUREMENT

AcceptEnvLC_IDENTIFICATIONLC_ALLLANGUAGE

AcceptEnvXMODIFIERS

#overridedefaultofnosubsystems

Subsystemsftp/usr/libexec/openssh/sftp-server

#Exampleofoverridingsettingsonaper-userbasis

#MatchUseranoncvs

#X11Forwardingno

#AllowTcpForwardingno

#PermitTTYno

#ForceCommandcvsserver

阅读剩余
THE END