انجمنهای فارسی اوبونتو
تازه کار => انجمن تازهکاران => نویسنده: nanophysic در 08 خرداد 1394، 01:03 بظ
-
سلام
من به وسیله ssh میخوام وصل بشم به یه ابررایانه .میشه راهنمایی کنید ک به چ چیزهایی نیاز دارم.لطفا خیلی ابتدایی واسم توضیح بدید.
البته با تلاش بسیار بعد از اینکه پسورد رو خواست و زدم این ارور رو داده
Permission denied, please try again.
یا
ای پی Connection closed by
-
ارتباط از راه سیاساچ تفاوت برجستهای در سیستمهای گوناگون نداره
$ ssh {userID}@{hostname}
$ # for example
$ ssh b12345@laurel.kudpc.kyoto-u.ac.jp
Enter passphrase for key '/home/$USER/.ssh/id_rsa': Entering your passphrase(not displayed).
منبع: https://web.kudpc.kyoto-u.ac.jp/manual/en/login/mac_linux
-
از کجا بدونم userID کدومه.
-
باید از مدیر سیستم و کسی که سرور رو راهاندازی کرده بپرسید.
-
ipهمون id هستش :oops:
-
ipهمون id هستش :oops:
ID=Idenity
IP=Internet protocol
الان چه ربطی داره ای دی و ای پی؟؟؟
مگه قرار نیست یه سرور secure sell قراره راه بندازید ؟؟؟؟
این بخش ای دی و ای پی برام نافهومه
-
قراره وصل بشم به یه سرور دیگه.از طریق سیستم عامل خودم که لینوکس با توزیع ابونتو هستش به یه ابر رایانه بروش ssh
من ip اونو دارم.از پوتی هم استفاده کردم ولی فقط یه صفحه مشکی باز میشه ](*,)
-
قراره وصل بشم به یه سرور دیگه.از طریق سیستم عامل خودم که لینوکس با توزیع ابونتو هستش به یه ابر رایانه بروش ssh
من ip اونو دارم.از پوتی هم استفاده کردم ولی فقط یه صفحه مشکی باز میشه ](*,)
تو انجمن هم سرچ کردی دوست عزیز؟؟؟
یادمه چندوقت پیش یکی دیگه همین مشکل را داشت با پاتی منم تو تاپیک شرکت کردم ولی یادم نیست مشکلش با پاتی حل شد یا نه کلمه ی putty را سرچ کن اولین لینک هست اونم براش فقط یه صفحه ی خاکستری میومد
-
از طریق ترمینال ک دستور ssh رو میزنم.بعد وارد کردن پسورد وپیغام میده ارتباط بسته
Connection closed by 176.100.55.84
از طریق پوتی هم این ارور رو میده Acsses denied
-
از آپشن v- استفاده کنید تا جزئیات بیشتری نشون داده بشه. مراحل زیر رو انجام بدید:
sudo service ssh start
ssh -v username@hostname
-
.seyedyazdi@gmail.com@176.122.48.74's password:
Connection closed by 176.122.48.74
lenovo@IdeaPad-Z510:~$ sudo service ssh start
[sudo] password for lenovo:
start: Job is already running: ssh
lenovo@IdeaPad-Z510:~$ ssh -v .seyedyazdi@gmail.com@IdeaPad-Z510
OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to ideapad-z510 [127.0.1.1] port 22.
debug1: Connection established.
debug1: identity file /home/lenovo/.ssh/id_rsa type -1
debug1: identity file /home/lenovo/.ssh/id_rsa-cert type -1
debug1: identity file /home/lenovo/.ssh/id_dsa type -1
debug1: identity file /home/lenovo/.ssh/id_dsa-cert type -1
debug1: identity file /home/lenovo/.ssh/id_ecdsa type -1
debug1: identity file /home/lenovo/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/lenovo/.ssh/id_ed25519 type -1
debug1: identity file /home/lenovo/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2 pat OpenSSH_6.6.1* compat 0x04000000
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5-etm@openssh.com none
debug1: kex: client->server aes128-ctr hmac-md5-etm@openssh.com none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA 85:20:a5:be:24:ee:e2:97:f7:01:c8:11:c6:ca:51:cf
The authenticity of host 'ideapad-z510 (127.0.1.1)' can't be established.
ECDSA key fingerprint is 85:20:a5:be:24:ee:e2:97:f7:01:c8:11:c6:ca:51:cf.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'ideapad-z510' (ECDSA) to the list of known hosts.
debug1: ssh_ecdsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /home/lenovo/.ssh/id_rsa
debug1: Trying private key: /home/lenovo/.ssh/id_dsa
debug1: Trying private key: /home/lenovo/.ssh/id_ecdsa
debug1: Trying private key: /home/lenovo/.ssh/id_ed25519
debug1: Next authentication method: password
.seyedyazdi@gmail.com@ideapad-z510's password:
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.
.seyedyazdi@gmail.com@ideapad-z510's password:
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.
.seyedyazdi@gmail.com@ideapad-z510's password:
debug1: Authentications that can continue: publickey,password
debug1: No more authentication methods to try.
Permission denied (publickey,password).
lenovo@IdeaPad-Z510:~$ ssh -v j
.seyedyazdi@gmail.com@176.101.48.74
OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 176.122.48.74 [176.122.48.74] port 22.
debug1: Connection established.
debug1: identity file /home/lenovo/.ssh/id_rsa type -1
debug1: identity file /home/lenovo/.ssh/id_rsa-cert type -1
debug1: identity file /home/lenovo/.ssh/id_dsa type -1
debug1: identity file /home/lenovo/.ssh/id_dsa-cert type -1
debug1: identity file /home/lenovo/.ssh/id_ecdsa type -1
debug1: identity file /home/lenovo/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/lenovo/.ssh/id_ed25519 type -1
debug1: identity file /home/lenovo/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
debug1: match: OpenSSH_4.3 pat OpenSSH_4* compat 0x00000000
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<3072<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: RSA 5f:44:cd:b5:15:7a:30:4f:40:68:eb:6f:c0:37:d1:de
debug1: Host '176.122.48.74' is known and matches the RSA host key.
debug1: Found key in /home/lenovo/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: Next authentication method: gssapi-with-mic
debug1: Unspecified GSS failure. Minor code may provide more information
No Kerberos credentials available
debug1: Unspecified GSS failure. Minor code may provide more information
No Kerberos credentials available
debug1: Unspecified GSS failure. Minor code may provide more information
debug1: Unspecified GSS failure. Minor code may provide more information
No Kerberos credentials available
debug1: Next authentication method: publickey
debug1: Trying private key: /home/lenovo/.ssh/id_rsa
debug1: Trying private key: /home/lenovo/.ssh/id_dsa
debug1: Trying private key: /home/lenovo/.ssh/id_ecdsa
debug1: Trying private key: /home/lenovo/.ssh/id_ed25519
debug1: Next authentication method: password
.seyedyazdi@gmail.com@176.122.48.74's password:
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
Permission denied, please try again.
.seyedyazdi@gmail.com@176.122.48.74's password:
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
Permission denied, please try again.
.seyedyazdi@gmail.com@176.122.48.74's password:
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: No more authentication methods to try.
Permission denied (publickey,gssapi-with-mic,password).
اینم تمام مشکل.لطفا کمک کنید تا مشکلشو پیدا کنم سریعتر.ممنون
-
یک نقطه در اول نامکاربریتون وجود داره آیا عمدیه؟! ضمناً نباید از ایمیلتون استفاده کنید باید بجاش «lenovo» رو بکار ببرید.
-
بله عمدی هستش.؟آخه خود سرور ایمیلو بعنوان شناسه کاربری اعلام کرده وطبق دستورات ک بهم داده بودن اونو باید بعنوان یوزر نیم میزاشتم قبل از@
lenovo@IdeaPad-Z510:~$ ssh lenovo@176.122.48.74
lenovo@176.122.48.74's password:
Connection closed by 176.122.48.74
lenovo@IdeaPad-Z510:~$
البته هاست نیم من IdeaPad-Z510 هستش
-
خروجی همهٔ دستورهای زیر رو تکبهتک قرار بدید:
cat /etc/ssh/sshd_config
cat /etc/hosts.deny
ls -la ~/.ssh
-
# Package generated configuration file
# See the sshd_config(5) manpage for details
# What ports, IPs and protocols we listen for
Port 22
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
Protocol 2
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
#Privilege Separation is turned on for security
UsePrivilegeSeparation yes
# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 3600
ServerKeyBits 1024
# Logging
SyslogFacility AUTH
LogLevel INFO
# Authentication:
LoginGraceTime 120
PermitRootLogin without-password
StrictModes yes
RSAAuthentication yes
PubkeyAuthentication yes
#AuthorizedKeysFile %h/.ssh/authorized_keys
# Don't read the user's ~/.rhosts and ~/.shosts files
IgnoreRhosts yes
# For this to work you will also need host keys in /etc/ssh_known_hosts
RhostsRSAAuthentication no
# similar for protocol version 2
HostbasedAuthentication no
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
#IgnoreUserKnownHosts yes
# To enable empty passwords, change to yes (NOT RECOMMENDED)
PermitEmptyPasswords no
# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication no
# Change to no to disable tunnelled clear text passwords
#PasswordAuthentication yes
# Kerberos options
#KerberosAuthentication no
#KerberosGetAFSToken no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
#UseLogin no
#MaxStartups 10:30:60
#Banner /etc/issue.net
# Allow client to pass locale environment variables
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication. Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
UsePAM yes
# /etc/hosts.deny: list of hosts that are _not_ allowed to access the system.
# See the manual pages hosts_access(5) and hosts_options(5).
#
# Example: ALL: some.host.name, .some.domain
# ALL EXCEPT in.fingerd: other.host.name, .other.domain
#
# If you're going to protect the portmapper use the name "rpcbind" for the
# daemon name. See rpcbind(8) and rpc.mountd(8) for further information.
#
# The PARANOID wildcard matches any host whose name does not match its
# address.
#
# You may wish to enable this to ensure any programs that don't
# validate looked up hostnames still leave understandable logs. In past
# versions of Debian this has been the default.
# ALL: PARANOID
lenovo@IdeaPad-Z510:~$ ls -la ~/.ssh
total 12
drwx------ 2 lenovo lenovo 4096 مه 29 12:12 .
drwxr-xr-x 37 lenovo lenovo 4096 مه 30 09:54 ..
-rw-r--r-- 1 lenovo lenovo 664 مه 30 10:34 known_hosts
به ترتیب دستورات ک فرمودید
-
شما فایلهای زیر رو درون دایرکتوری ssh. ندارید. آیا قبلاً کلید SSH ساختید؟
-rw-------. 1 root root 786 Oct 14 09:35 authorized_keys
-rw-------. 1 root root 1675 Oct 13 08:24 id_rsa
-rw-r--r--. 1 root root 393 Oct 13 08:24 id_rsa.pub
-rw-r--r--. 1 root root 448 Oct 13 12:51 known_hosts
-
نه هیج کلیدی نساختم. :( .چیکار باید کنم لطفا بیشتر راهنمایی کنید
-
مطلب زیر رو کامل بخونید و مراحل رو همونطور که گفتهشده انجام بدید. عذر میخوام ولی من تا عصر آفلاین هستم تا اون موقع هر مشکلی پیدا کردید همینجا بنویسید حتماً دوستان دیگه و یا خود من جواب شما رو خواهند داد:
https://help.github.com/articles/generating-ssh-keys
-
تا جایی ک متوجه منظورش شدم پیش رفتم اما در گام سوم قسمت دوم متوجه نشدم چ کنم.مرحله بعدم وابسته ب همین هستش
-
برای کار شما دو گام اول کافیه! نیازی به رد کردن مراحل بعدی نیست.
-
با تشکر از همه دوستانی ک کمکم کردن بلاخره حل شد.جناب نوید ازطریق همون لینکی ک گذاشته بودید مشکلم برطرف شد.ممنون.
-
حل شد یادتون نره
-
8)
تنها راهی ک ب ذهنم رسید.بلد نبودن ک عیب نیست.دوستانی ک مشکل مشابه دارن از این لینک استفاده کنند.
http://forum.ubuntu.ir/index.php/topic,117401.0.html
-
خب جرا متن مشکل رو پاک کردی حالا؟ از کجا بدونیم مشکل مشابه داریم یا نه؟
-
ایشون یک موضوع جدید ایجاد کردن و اون رو به موضوع قبلی ارجاع دادن (: از دید من این موضوع رو حذف و یک «(حل شد)» به ته تیتر موضوع قبلی اضافه کنید.
-
درسته.