xoduts
June 30, 2008, 5:04pm
1
คือผมไม่สามารถ Login root ผ่าน ssh ได้ พอใส่ user + pass แล้วโปรแกรม putty ก็ปิดไปเลย
แล้วก็็ไม่สามารถสั่ง restart ผ่าน DriectAdmin ได้เลย มันขึ้น /sbin/service httpd restart 2>&1 ตลอดเลยครับ
ผมมี System Backup ของ DriectAdmin จะ Restore กลับเข้าไปยังไงครับ
ขอบคุณล่วงหน้าครับ
เคย login root เข้า ssh ได้มาก่อนหรือเปล่า หากยังไม่เคยก็ไปทำที่หน้าเครื่อง
login root ที่หน้าเครื่องแล้วทำตามนี้
/etc/init.d/iptables stop
ถาม service ดูว่ามี sshd ทำงานหรือเปล่า (หัดคุยกับเครื่องบ้างครับ มันคุยกับเรารู้เรื่อง)
ps -aux | grep ssh
restore full system backup ของ da
[quote]
Hello,
For each tar.gz file, extract it into place… that’s about it
example, to extract /etc/virtual
from /backup/07-30-04/custom/etc/virtual.tar.gz
cd /etc
tar xvzfp /backup/07-30-04/custom/etc/virtual.tar.gz
do that for all files in directadmin.com/paths.html
Be careful with the /etc/passwd, /etc/shadow, /etc/group, etc… files… test out your login/lougout of ssh before logging out after replacing those files.
I’ll recommend you first install DA and it’s services before restoring the data… as it doesn’t restore binaries, just the data they use.
จะบอกให้อีกนิด… อย่า allow root access ssh เด็ดขาด
ให้สร้าง user group root เข้าแทน root แล้วใช้ su - ในการเข้า root อีกทีครับ
cd /etc/ssh
vi sshd_config
ไปบรรทัดสุดท้ายใส่
AllowUsers username
แล้ว restart service sshd ใหม่
/etc/init.d/sshd restart
good luck
/sbin/service httpd restart 2>&1
ตัว control panel ทำงานได้ถูกต้องอยู่แล้วครับ คุณสามารถสั่งเองด้วยมือได้แบบนี้เช่นกัน
/sbin/service httpd restart
xoduts
June 30, 2008, 6:25pm
5
เคย Login ได้ครับ แต่เพิ่งเป็นเมื่อคืนนี้เองครับ ตอนนี้ ssh เปิดอยู่แต่ไม่สามารถ login ได้ พอใส่ passwd โปรแกรมมันก็ดับไปเลย
ssh มันจะสร้าง key ssh ไว้ที่ตัวเครื่องด้วย ผมไม่รู้ว่า putty เก็บไฟล์ key access ssh ไว้ที่ไฟลไหนครับ (ผมใช้ mac จะเป็น ssh ตัวจริงๆ)
ลองเข้า server ที่เข้าได้แล้วใช้คำสั่ง ssh เรียกเข้าไปก็ได้
หรือลองเปลี่ยนเครื่องเปิด putty ดู
หากเรามั่นใจว่าไม่ได้ไปทำอะไรกับเครื่องก่อนหน้านี้ครับ
xoduts
June 30, 2008, 8:15pm
7
คือ user root ไม่สามารถใช้งานได้เลยอ่ะครับ
มีการกด switch reset เครื่องหรือเปล่า หากอยู่ๆไปกด reset switch อาจจะทำให้ file system เสีย
xoduts
June 30, 2008, 8:29pm
10
ไม่แน่ใจอ่ะครับ restore backup ก็ไม่ได้ เลยไม่รู้จะทำยังไงเลย
อย่าพึ่งท้อแท้ครับ… จำไว้… ไม่มีงานอะไรง่ายๆให้เราทำเลย แล้วจะสบายใจ
รบกวน cap หน้าจอ directadmin ตรงเมนู Service Monitor มาให้ผมชมหน่อยครับ
อย่างรูปที่ผมทำให้ดูครับ
ตัวนี้ก็ VPS ที่ผมเปิดบริการเหมือนกัน…
คาดว่าตัว sbin คงมีปัญหาแล้วหละครับ
xoduts
July 1, 2008, 4:10am
14
ขอบคุณนะครับ ที่ช่วยสละ้เวลามาตอบคำถาม ผมแนบรูปมาให้แล้วครับ
kke
July 1, 2008, 6:06am
15
เข้า ssh ไม่ได้ เครื่องโดน hack หรือเปล่าครับ
มีการถูก deface หน้า index ไปบ้างหรือเปล่า
ลองเข้าเป็น user admin ดูก่อนครับ
จากนั้นค่อย su - เป็น root อีกที
ถ้าเข้า admin ไม่ได้ ตรวจสอบ sshd_config ด้วยว่ามี
AllowUsers admin อยู่หรือเปล่า (โดยปกติ da จะเพิ่มไว้ให้อยู่แล้ว)
xoduts
July 1, 2008, 6:36pm
16
คือทุก user ที่ login เข้า ssh พอใส่ pass โปรแกรมมันก็ปิดไปเองเลยอะครับ
หากไว้ใจผม… รบกวนขอลองหน่อยครับ ส่งมาที่ PM นะครับ (จะเด้งเหมือนกันไหม)
รายงานผล…
$ ssh xxx@xxx.xxx.xxx.xxx
The authenticity of host ‘xxx.xxx.xxx.xxx (xxx.xxx.xxx.xxx )’ can’t be established.
RSA key fingerprint is 4f:af:de:d1:06:8e:b6:03:d3:fa:ba:65:97:7b:01:8b.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘xxx.xxx.xxx.xxx ’ (RSA) to the list of known hosts.
xxx@xxx.xxx.xxx.xxx ’s password:
Last login: Tue Jul
ton1
July 1, 2008, 8:52pm
19
เป็นไปได้ สามกรณีครับ
1.file system พัง
2.โดน hack
3.disk เต็ม
หนามหยอกเอาหนามบ่ม… hack กลับเลยท่านฯ