Tuesday, November 4, 2014

How to change "Ethernet" card's speed in Linux.

Check the NIC cards speed and other attributes.
#ethtool eth0
Settings for eth1: Supported ports: [ TP ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Advertised auto-negotiation: Yes Speed: 1000Mb/s Duplex: Full Port: Twisted Pair PHYAD: 0 Transceiver: internal Auto-negotiation: on Supports Wake-on: pumbg Wake-on: g Current message level: 0x00000033 (51) Link detected: yes // Supported link must be 1000 for Gigabit support.
To force a speed change to 1000Mbps, full duplex mode, run:
# ethtool -s eth0 speed 1000 duplex full autoneg off

== Permanent  solutions =
vi /etc/sysconfig/network-scripts/ifcfg-eth0:

   ETHTOOL_OPTS="speed 1000 duplex full autoneg off"     //Set ETHTOOL_OPT value.
Restart the interface to apply changes: # ifdown eth0 && ifup eth0

check:
https://iperf.fr //you will get testing tool.
==========Check from windows Windows ==============
Check windows ethernet speed: C:\Users\Administrator.LDC13>wmic NIC where NetEnabled=true get Name, Speed Name Speed Realtek PCIe GBE Family Controller 1000000000



How to be a ssh root user for Ubuntu.

How to be a ssh root user for Ubuntu.


First log in at a user:

login as: nixproo
nixpro@202.53.1**.1**'s password: ******

noxproo@ubuntu:/$ sudo su          //logged in by root user
[sudo] password for nixpro: ****** //Provide the root password



root@ubuntu:/# sudo -i
root@ubuntu:~# sudo passwd root


Enter new UNIX password: ******
Retype new UNIX password:******

passwd: password updated successfully

root@ubuntu:~# vi /etc/ssh/sshd_config

 28 ## PermitRootLogin without-password //Comment this line
 29 PermitRootLogin yes        // Set PermitRootLogin no to yes
 30 StrictModes yes


root@ubuntu:~# sudo service ssh restart

ssh stop/waiting
ssh start/running, process *****



Use putty or other ssh client and log-in as a root user.