RouterOS导入key登陆ssh

Linux或者Mac OS生成一个key

ssh-keygen -t rsa

用scp上传到Mikrotik

scp -P端口 ~/.ssh/id_rsa.pub admin@10.0.100.1:id_rsa.pub

在Mikrotik内导入key

[admin@MikroTik] > /user ssh-keys import public-key-file=id_rsa.pub user=admin

打印查看

[admin@MikroTik] > /user ssh-keys print
Flags: R - RSA, D - DSA        
 #   USER                       BITS KEY-OWNER        
 0 R admin                      2048 XXXXXXX

ipmitool获取mac地址

抓取主板第一个网卡mac地址

ipmitool  raw 0x30 0x21 | tail -c 18 |sed 's/ /:/g'

抓取BMC网口mac地址

ipmitool raw 0x0c 0x02 0x01 0x05 0x00 0x00|tail -c18| sed 's/ /:/g'
or
ipmitool lan print | grep "MAC Address" |tail -c18

转载:How To Connect To Cisco Devices Via Serial Port Using GNU/Linux

原文链接 :https://acidborg.wordpress.com/2010/12/30/how-to-connect-to-cisco-devices-via-serial-port-using-gnulinux/
原文标题:How To Connect To Cisco Devices Via Serial Port Using GNU/Linux

Filed under: Linux, SysAdmin — acidborg @ 10:17
Description: to connect your computer to a Cisco device via its console port, you usually need a RJ45 rolled cable. You can use a RJ-45 to DB-9 Female if your computer has a serial port.

RJ-45 to DB-9 Female

To communicate through the serial port with the Cisco device, you need Minicom, a terminal emulator software.

阅读剩余部分...

RouterOS软路由常用命令

修改用户密码

[admin@MikroTik]>/user                               #进入操作路径
[admin@MikroTik]/user>print                           #显示RouterOS用户
[admin@MikroTik]/user>set admin password=123456        #修改admin用户密码为123456
[admin@MikroTik] /user> /                              #返回根目录

在当前用户下修改密码

[admin@MikroTik]>password                             #修改本目录用户密码备份命令

阅读剩余部分...

dd安装Routeros

wget http://download2.mikrotik.com/routeros/6.43.8/chr-6.43.8.img.zip -O chr.img.zip && \

gunzip -c chr.img.zip > chr.img && \

mount -o loop,offset=33554944 chr.img /mnt && \

ADDRESS0=`ip addr show eth0 | grep global | cut -d' ' -f 6 | head -n 1` && \

GATEWAY0=`ip route list | grep default | cut -d' ' -f 3` && \

echo "/ip address add address=$ADDRESS0 interface=[/interface ethernet find where name=ether1]

/ip route add gateway=$GATEWAY0

" > /mnt/rw/autorun.scr && \

umount /mnt && \

echo u > /proc/sysrq-trigger && \

dd if=chr.img bs=1024 of=/dev/vda && \

reboot

CentOS7重新生成 /boot/grub2/grub.cfg

修改/etc/default/grub

GRUB_CMDLINE_LINUX="rd.lvm.lv=centos/swap vconsole.font=latarcyrheb-sun16 rd.lvm.lv=centos/root crashkernel=auto vconsole.keymap=us rhgb quiet"

GRUB_CMDLINE_LINUX="rd.lvm.lv=centos/swap vconsole.font=latarcyrheb-sun16 rd.lvm.lv=centos/root crashkernel=auto enforcing=0 vconsole.keymap=us rhgb quiet"

添加 enforcing=0 或者net.ifnames=0 biosdevname=0

存盘退出

执行 grub2-mkconfig --output /boot/grub2/grub.cfg


MacOS修改单个应用程序默认语言

背景

Mac系统语言设置的是英文,安装的Office语言默认也是英文。由于习惯了中文Office的使用,想把Office的语言设置成中文,    
方法之一就是直接修改系统的默认语言设置,但并不希望直接修改系统语言,仅想修改Office软件的默认语言

实现

1获取App的Bundle Identifier

Bundle Identifier是应用软件的标识,以Microsoft Word为例,Terminal中输入命令:

mdls -name kMDItemCFBundleIdentifier /Applications/Microsoft\ Word.app

2得到结果:

kMDItemCFBundleIdentifier = "com.microsoft.Word"

3修改应用程序默认语言

该操作需要用到第一步查到的应用程序Bundle Identifier,本例中是com.microsoft.Word,Terminal中输入命令:

defaults write com.microsoft.Word AppleLanguages '("zh_CN")'

阅读剩余部分...