النتائج 1 إلى 3 من 3

الموضوع: سؤال فى الوصول للسيرفر من خلال ال ssh

  1. #1
    عضو الصورة الرمزية Dr Virus.exe
    تاريخ التسجيل
    Mar 2011
    المشاركات
    473
    الدولة: Australia
    معدل تقييم المستوى
    0

    سؤال فى الوصول للسيرفر من خلال ال ssh



    السلام عليكم ,

    ليش لما اشبك على السيرفر من خلال ال ssh الالوان ما بتكون زى الالوان اللى فى الشل؟؟


    هل يوجد حل لهذه المشكلة
    سبحان الله و بحمده سبحان الله العظيم
    سبحان الله و بحمده سبحان الله العظيم
    سبحان الله و بحمده سبحان الله العظيم
    =================================

    http://www7.0zz0.com/2012/04/07/12/958364589.jpg

  2. #2
    مخالف للقوانين
    تاريخ التسجيل
    May 2011
    المشاركات
    626
    معدل تقييم المستوى
    0

    رد: سؤال فى الوصول للسيرفر من خلال ال ssh

    عليكم السلام ورحمة الله وبركاتة

    أفتح علي السيرفر ملف
    كود:
    nano ~/.bashrc

    و اضف فيه التالي :
    كود:
    # User specific aliases and functions # Colors Black="$(tput setaf 0)" BlackBG="$(tput setab 0)" DarkGrey="$(tput bold ; tput setaf 0)" LightGrey="$(tput setaf 7)" LightGreyBG="$(tput setab 7)" White="$(tput bold ; tput setaf 7)" Red="$(tput setaf 1)" RedBG="$(tput setab 1)" LightRed="$(tput bold ; tput setaf 1)" Green="$(tput setaf 2)" GreenBG="$(tput setab 2)" LightGreen="$(tput bold ; tput setaf 2)" Brown="$(tput setaf 3)" BrownBG="$(tput setab 3)" Yellow="$(tput bold ; tput setaf 3)" Blue="$(tput setaf 4)" BlueBG="$(tput setab 4)" LightBlue="$(tput bold ; tput setaf 4)" Purple="$(tput setaf 5)" PurpleBG="$(tput setab 5)" Pink="$(tput bold ; tput setaf 5)" Cyan="$(tput setaf 6)" CyanBG="$(tput setab 6)" LightCyan="$(tput bold ; tput setaf 6)" NC="$(tput sgr0)" # No Color # Functions spin () { echo -ne "$White-" echo -ne "$LightGray\b|" echo -ne "$LightGreen\bx" sleep .02 echo -ne "$LightBlue\b+$RC" } typetext1 () { sleep .02 echo -ne "$LightGreen W" sleep .02 echo -ne e sleep .02 echo -ne l sleep .02 echo -ne c sleep .02 echo -ne o sleep .02 echo -ne m sleep .02 echo -ne e sleep .02 echo -ne " " sleep .02 echo -ne t sleep .02 echo -ne o sleep .02 echo -ne " " sleep .02 echo -ne "$HOSTNAME $NC" sleep .02 } typetext2 () { sleep .02 echo -ne "$LightGreen E" sleep .02 echo -ne n sleep .02 echo -ne j sleep .02 echo -ne o sleep .02 echo -ne y sleep .02 echo -ne " " sleep .02 echo -ne y sleep .02 echo -ne o sleep .02 echo -ne u sleep .02 echo -ne r sleep .02 echo -ne " " sleep .02 echo -ne s sleep .02 echo -ne t sleep .02 echo -ne a sleep .02 echo -ne y sleep .02 echo -ne "! " sleep .02 } dots () { sleep .5 echo -ne "$LightGreen ." sleep .5 echo -ne . sleep .5 echo -ne . sleep .8 echo -ne "$LightBlue done" } DISTRO="Unknown Distro" test -r "/etc/slackware-version" && DISTRO=`cat /etc/slackware-version` test -r "/etc/debian_version" && DISTRO=`cat /etc/debian_version` test -r "/etc/libranet_version" && DISTRO=`cat /etc/libranet_version` test -r "/etc/redhat-release" && DISTRO=`cat /etc/redhat-release` test -r "/etc/SuSE-release" && DISTRO=`cat /etc/SuSE-release` test -r "/etc/mandrake-release" && DISTRO=`cat /etc/mandrake-release` test -r "/etc/gentoo-release" && DISTRO=`cat /etc/gentoo-release` test -r "/etc/turbolinux-release" && DISTRO=`cat /etc/turbolinux-release` memfree="`cat /proc/meminfo | grep MemFree | cut -d: -f2 | cut -dk -f1`"; memtotal="`cat /proc/meminfo | grep MemTotal | cut -d: -f2 | cut -dk -f1`"; memfreepcnt=$(echo "scale=5; $memfree/$memtotal*100" | bc -l); # Welcome screen clear; echo -e ""; for i in `seq 1 15` ; do spin; done; typetext1; for i in `seq 1 15` ; do spin; done ;echo ""; echo ""; echo -ne "$LightBlue Hello $LightGreen$USER $LightBlue!"; echo ""; sleep .3; echo ""; echo -ne "$LightBlue Today is: $LightGreen`date`"; echo ""; sleep .3; echo -ne "$LightBlue Last login:$LightGreen `lastlog | grep $USER | awk '{print $4" "$6" "$5" "$9}'`$LightBlue at$LightGreen `lastlog | grep $USER | awk '{print $7}'`$LightBlue from$LightGreen `lastlog | grep $USER | awk '{print $3}'`"; echo ""; sleep .3; echo ""; echo -ne "$LightBlue Loading system information"; dots; echo ""; sleep .3; echo ""; echo -ne "$LightBlue Distro: $LightGreen $DISTRO"; echo ""; echo -ne "$LightBlue Kernel: $LightGreen `uname -smr`"; echo ""; echo -ne "$LightBlue CPU: $LightGreen `grep "model name" /proc/cpuinfo | cut -d : -f2`"; echo ""; echo -ne "$LightBlue Speed: $LightGreen`grep "cpu MHz" /proc/cpuinfo | cut -d : -f2` MHz"; echo ""; echo -ne "$LightBlue Load: $LightGreen `w | grep up | awk '{print $10" "$11" "$12}'`"; echo ""; echo -ne "$LightBlue RAM: $LightGreen `cat /proc/meminfo | head -n 1 | awk '/[0-9]/ {print $2}'` MB"; echo ""; echo -ne "$LightBlue Usage: $LightGreen $memfreepcnt %" echo ""; echo -ne "$LightBlue IP: $LightGreen `/sbin/ip addr show eth0 | grep 'inet ' | cut -d t -f2 | cut -d / -f1 | cut -b 2-`"; echo ""; echo -ne "$LightBlue Uptime: $LightGreen `uptime | awk {'print $3" "$4" "$5'} | sed 's/:/ hours, /' | sed -r 's/,$/ minutes/'`"; echo ""; sleep .3; echo ""; for i in `seq 1 21` ; do spin; done; typetext2; for i in `seq 1 20` ; do spin; done ;echo ""; echo "" $NC; # Fancy bash PS1='\[$LightBlue\][\[$LightGreen\]\u\[$LightBlue\]:\[$LightGreen\]\h\[$LightBlue\]][\[$LightGreen\]\w\[$LightBlue\]]\n\$\[$NC\] '
    ثم أفتح الملف التالي :
    كود:
    nano /root/.bashrc

    و اضف التالي :
    كود:
    # User specific aliases and functions
    
    
    # Colors
    
    
    Black="$(tput setaf 0)"
    BlackBG="$(tput setab 0)"
    DarkGrey="$(tput bold ; tput setaf 0)"
    LightGrey="$(tput setaf 7)"
    LightGreyBG="$(tput setab 7)"
    White="$(tput bold ; tput setaf 7)"
    Red="$(tput setaf 1)"
    RedBG="$(tput setab 1)"
    LightRed="$(tput bold ; tput setaf 1)"
    Green="$(tput setaf 2)"
    GreenBG="$(tput setab 2)"
    LightGreen="$(tput bold ; tput setaf 2)"
    Brown="$(tput setaf 3)"
    BrownBG="$(tput setab 3)"
    Yellow="$(tput bold ; tput setaf 3)"
    Blue="$(tput setaf 4)"
    BlueBG="$(tput setab 4)"
    LightBlue="$(tput bold ; tput setaf 4)"
    Purple="$(tput setaf 5)"
    PurpleBG="$(tput setab 5)"
    Pink="$(tput bold ; tput setaf 5)"
    Cyan="$(tput setaf 6)"
    CyanBG="$(tput setab 6)"
    LightCyan="$(tput bold ; tput setaf 6)"
    NC="$(tput sgr0)" # No Color
    
    
    
    
    # Functions
    
    
    spin ()
    {
    echo -ne "$White-"
    echo -ne "$LightGray\b|"
    echo -ne "$LightGreen\bx"
    sleep .02
    echo -ne "$LightBlue\b+$RC"
    }
    
    
    typetext1 ()
    {
    sleep .02
    echo -ne "$LightGreen W"
    sleep .02
    echo -ne e
    sleep .02
    echo -ne l
    sleep .02
    echo -ne c
    sleep .02
    echo -ne o
    sleep .02
    echo -ne m
    sleep .02
    echo -ne e
    sleep .02
    echo -ne " "
    sleep .02
    echo -ne t
    sleep .02
    echo -ne o
    sleep .02
    echo -ne " "
    sleep .02
    echo -ne "$HOSTNAME $NC"
    sleep .02
    }
    
    
    typetext2 ()
    {
    sleep .02
    echo -ne "$LightGreen E"
    sleep .02
    echo -ne n
    sleep .02
    echo -ne j
    sleep .02
    echo -ne o
    sleep .02
    echo -ne y
    sleep .02
    echo -ne " "
    sleep .02
    echo -ne y
    sleep .02
    echo -ne o
    sleep .02
    echo -ne u
    sleep .02
    echo -ne r
    sleep .02
    echo -ne " "
    sleep .02
    echo -ne s
    sleep .02
    echo -ne t
    sleep .02
    echo -ne a
    sleep .02
    echo -ne y
    sleep .02
    echo -ne "! "
    sleep .02
    }
    
    
    dots ()
    {
    sleep .5
    echo -ne "$LightGreen ."
    sleep .5
    echo -ne .
    sleep .5
    echo -ne .
    sleep .8
    echo -ne "$LightBlue done"
    }
    
    
    DISTRO="Unknown Distro" 
    test -r "/etc/slackware-version" && DISTRO=`cat /etc/slackware-version`
    test -r "/etc/debian_version" && DISTRO=`cat /etc/debian_version`
    test -r "/etc/libranet_version" && DISTRO=`cat /etc/libranet_version`
    test -r "/etc/redhat-release" && DISTRO=`cat /etc/redhat-release`
    test -r "/etc/SuSE-release" && DISTRO=`cat /etc/SuSE-release`
    test -r "/etc/mandrake-release" && DISTRO=`cat /etc/mandrake-release`
    test -r "/etc/gentoo-release" && DISTRO=`cat /etc/gentoo-release`
    test -r "/etc/redhat-release" && DISTRO=`cat /etc/redhat-release`
    
    
    memfree="`cat /proc/meminfo | grep MemFree | cut -d: -f2 | cut -dk -f1`";
    memtotal="`cat /proc/meminfo | grep MemTotal | cut -d: -f2 | cut -dk -f1`";
    memfreepcnt=$(echo "scale=5; $memfree/$memtotal*100" | bc -l);
    
    
    # Welcome screen
    
    
    clear;
    echo -e "";
    for i in `seq 1 15` ; do spin; done; typetext1; for i in `seq 1 15` ; do spin; done ;echo "";
    echo "";
    echo -ne "$LightBlue Hello $LightGreen`whoami` $LightBlue!";
    echo ""; sleep .3;
    echo "";
    echo -ne "$LightBlue Today is: $LightGreen`date`";
    echo ""; sleep .3;
    echo -ne "$LightBlue Last login:$LightGreen `lastlog | grep $USER | awk '{print $4" "$6" "$5" "$9}'`$LightBlue at$LightGreen `lastlog | grep $USER | awk '{print $7}'`$LightBlue from$LightGreen `lastlog | grep $USER | awk '{print $3}'`";
    echo ""; sleep .3;
    echo "";
    echo -ne "$LightBlue Loading system information"; dots; 
    echo ""; sleep .3;
    echo "";
    echo -ne "$LightBlue Distro: $LightGreen $DISTRO";
    echo "";
    echo -ne "$LightBlue Kernel: $LightGreen `uname -smr`";
    echo "";
    echo -ne "$LightBlue CPU:   $LightGreen `grep "model name" /proc/cpuinfo | cut -d : -f2`";
    echo "";
    echo -ne "$LightBlue Speed:  $LightGreen`grep "cpu MHz" /proc/cpuinfo | cut -d : -f2` MHz"; 
    echo "";
    echo -ne "$LightBlue Load:   $LightGreen `w | grep up | awk '{print $10" "$11" "$12}'`";
    echo "";
    echo -ne "$LightBlue RAM:    $LightGreen `cat /proc/meminfo | head -n 1 | awk '/[0-9]/ {print $2}'` MB";
    echo "";
    echo -ne "$LightBlue Usage:  $LightGreen $memfreepcnt %"
    echo "";
    echo -ne "$LightBlue IP:     $LightGreen `/sbin/ip addr show eth0 | grep 'inet ' | cut -d t -f2 | cut -d / -f1 | cut -b 2-`";
    echo "";
    echo -ne "$LightBlue Uptime: $LightGreen `uptime | awk {'print $3" "$4" "$5'} | sed 's/:/ hours, /' | sed -r 's/,$/ minutes/'`";
    echo ""; sleep .3;
    echo "";
    for i in `seq 1 21` ; do spin; done; typetext2; for i in `seq 1 20` ; do spin; done ;echo "";
    echo "" $NC;
    
    
    # Fancy bash
    
    
    PS1='\[$LightBlue\][\[$LightRed\]\u\[$LightBlue\]\[$LightGreen\]\[$LightBlue\]]\n[\[$LightGreen\]\w\[$LightBlue\]]\n\$\[$NC\] '

    هنا ايضاً موقع يفيدك في التلوين علي الشل .

    http://www.faqs.org/docs/abs/HTML/colorizing.html

  3. #3
    عضو الصورة الرمزية Dr Virus.exe
    تاريخ التسجيل
    Mar 2011
    المشاركات
    473
    الدولة: Australia
    معدل تقييم المستوى
    0

    رد: سؤال فى الوصول للسيرفر من خلال ال ssh



    الاخ Dr.MHafez شكرا على مرورك الكريم .... ........ قمت بالتعديل و لكن الالوان كما هى على ال ssh
    سبحان الله و بحمده سبحان الله العظيم
    سبحان الله و بحمده سبحان الله العظيم
    سبحان الله و بحمده سبحان الله العظيم
    =================================

    http://www7.0zz0.com/2012/04/07/12/958364589.jpg

المواضيع المتشابهه

  1. سؤال عن كيفية الوصول إلى مول سوق العصر ؟
    بواسطة A. Waheed في المنتدى الأرشيف
    مشاركات: 3
    آخر مشاركة: 19-10-2010, 17:20
  2. مساعدة :الوصول للسيرفر من PC or Mobile
    بواسطة y85.fox في المنتدى منتدى الشهادات العام
    مشاركات: 4
    آخر مشاركة: 07-10-2010, 09:36
  3. مشاركات: 0
    آخر مشاركة: 15-06-2010, 15:33
  4. سؤال: اعداد الرواتر من خلال الاتصال به عبر ال FTP
    بواسطة era2006 في المنتدى الأرشيف
    مشاركات: 1
    آخر مشاركة: 24-06-2008, 00:23

المفضلات

ضوابط المشاركة

  • لا تستطيع إضافة مواضيع جديدة
  • لا تستطيع الرد على المواضيع
  • لا تستطيع إرفاق ملفات
  • لا تستطيع تعديل مشاركاتك
  •