数保软件服务热线
新闻中心

您当前的位置:主页 > 新闻中心 > 技术交流 > 技术交流

CENTOS 6.9 U盘安装,XMANAGER ,远程SSH

打印 打印 来源 数保计算机 点击:
编辑:数保计算机 时间:2020-02-29 19:00


用U盘安装时,不小心没修改引导区时,只能通过U盘启动

通过U盘启动以后进行入系统

 1、切换到root用户
#su -- root
2、进入grub模式
#grub
3、之后按如下步骤做
grub>find /boot/grub/stage1或者find /grub/stage1
一般会返回类似于(hd0,5)之类的,记住它。
grub>quit
4、编辑grub.conf
#vim /boot/grub/grub.conf
把该文件中所有出现(hdx,y)的全部替换成第3步得到的值
5、重新进入grub模式并执行以下步骤,注意下面两个命令中间有空格。
grub>root  (hdx,y)   
grub>setup (hdx)
grub>quit
6、重启
#shutdown -r now
 

#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS 6 (2.6.32-696.el6.x86_64)
        root (hd0,0)
        kernel /tboot.gz logging=vga,serial,memory
        module /vmlinuz-2.6.32-696.el6.x86_64 ro root=UUID=a7ac101e-14d1-4dc0-a756-1a8c149d2649
intel_iommu=on amd_iommu=on rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD
SYSFONT=latarcyrheb-sun16 crashkernel=128M  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
        module /initramfs-2.6.32-696.el6.x86_64.img
~
~
~


XMANAGER3  连接配置

修改:/etc/gdm/coustom.conf

 GDM configuration storage
 
[daemon]
 
[security]
AllowRemoteRoot=true
[xdmcp]
Enable=true
Port=177
[greeter]
 
[chooser]
 
[debug]
 
~

SSH 修改端口



(1) /etc/ssh/sshd_config

# This is the sshd server system-wide configuration file.  See
# sshd_config(5) for more information.
 
# This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin
 
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented.  Uncommented options change a
# default value.
 
Port 22222
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::
 
# Disable legacy (protocol version 1) support in the server for new
# installations. In future the default will change to require explicit
# activation of protocol 1
Protocol 2
 
# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key
 
# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 1024
 
# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
SyslogFacility AUTHPRIV
#LogLevel INFO
 
# Authentication:
 
#LoginGraceTime 2m
#PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10
 
#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile     .ssh/authorized_keys
#AuthorizedKeysCommand none
#AuthorizedKeysCommandRunAs nobody
 


/etc/ssh/ssh_config


 
# Host *
#   ForwardAgent no
#   ForwardX11 no
#   RhostsRSAAuthentication no
#   RSAAuthentication yes
#   PasswordAuthentication yes
#   HostbasedAuthentication no
#   GSSAPIAuthentication no
#   GSSAPIDelegateCredentials no
#   GSSAPIKeyExchange no
#   GSSAPITrustDNS no
#   BatchMode no
#   CheckHostIP yes
#   AddressFamily any
#   ConnectTimeout 0
#   StrictHostKeyChecking ask
#   IdentityFile ~/.ssh/identity
#   IdentityFile ~/.ssh/id_rsa
#   IdentityFile ~/.ssh/id_dsa
   Port 22222
#   Protocol 2,1
#   Cipher 3des
#   Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
#   MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
#   EscapeChar ~
#   Tunnel no
#   TunnelDevice any:any
#   PermitLocalCommand no
#   VisualHostKey no
Host *
        GSSAPIAuthentication yes
# If this option is set to yes then remote X11 clients will have full access
# to the original X11 display. As virtually no X11 client supports the untrusted
# mode correctly we set this to yes.
        ForwardX11Trusted yes
# Send locale-related environment variables
        SendEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
        SendEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
        SendEnv LC_IDENTIFICATION LC_ALL LANGUAGE
        SendEnv XMODIFIERS

 


修改以后,重启服务

service sshd restart 



CENTOS 6.9 加入了CLOUD 概念,会造成一般机器启动时间过长,才能连接。

需要关闭CLOUD相关服务,加快启动时间。


 




Copyright © 2015-2022 长沙数保信息科技有限公司 ┇ 湘ICP备08103633号 湘公网安备 43011102000746号

地址:长沙市岳麓区润花园D1-903 公司邮箱:dpisi@163.com
7*24小时技术支持服务热线:0731-85057097/13607439515 QQ: 400528 或 156462627

湘公网安备 43011102000746号