LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-15-2019, 03:16 AM   #1
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Rep: Reputation: 73
ssh connection problem


I'm trying to learn ssh. I have a little webpage on goDaddy.

I generated keys.

Quote:
ssh-keygen -t ed25519 -f ~/.ssh/godaddy_ed25519 -C "My ssh key"
First, I tried to login, I've managed this before:

Quote:
pedro@pedro-school2:~$ ssh Pedroski@www.xxx.yyy.zzz
It asks me for a password:

I tried my goDaddy User login password. No joy.
I tried my cPanel login password. No joy.
I logged in, changed the cPanel password, tried ssh login with the new PW again. No joy.

Now it blocks me. Too many unsuccessful login attempts I suppose.

Quote:
pedro@pedro-school2:~$ ssh Pedroski@www.xxx.yyy.zzz
ssh_exchange_identification: read: Connection reset by peer
This is only a cheap and nasty goDaddy shared host, maybe that is the problem.

What password do I need to give in response to ssh?

My goDaddy username login password, or my cPanel password.

Both don't seem to work.
 
Old 06-15-2019, 06:45 AM   #2
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,734

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
When you ssh into a server with a user@server, you'll need the password for the user -- Pedroski in this case which, I suspect, is not capitalized...try pedroski -- very unusual to use mixed case for usernames.
 
Old 06-15-2019, 04:51 PM   #3
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Original Poster
Rep: Reputation: 73
Thanks.

Pedroski is not the right name. The right name is my cPanel login name, a jumble of letters and numbers.

I understand that goDaddy might block me after repeated failed login attempts.
I thought, if I wait a bit, sleep on it, maybe it will work again. Wrong!

Quote:
pedro@pedro-school2:~$ ssh mycpanelusername@123.456.123.456
ssh_exchange_identification: read: Connection reset by peer
From goDaddy help chat, another customer with the same problem getting advice:

Quote:
Ok, your next move would be to make sure that your IP is not blocked...
Answer:

Quote:
After about 45 minutes on the phone they figured it out and got my account unblocked. Thank you very much for the advice.
Someone said, go to your cPanel, switch ssh off, then on again, should unblock it. That did not work for me. I think I will get an account at Digital Ocean!

but my own computer also refuses me?

Quote:
pedro@pedro-school2:~$ ssh localhost
ssh: connect to host localhost port 22: Connection refused
pedro@pedro-school2:~$ ssh pedro@localhost
ssh: connect to host localhost port 22: Connection refused
pedro@pedro-school2:~$ ssh test@localhost
ssh: connect to host localhost port 22: Connection refused
pedro@pedro-school2:~$
Tried as sudo, no go:

Quote:
pedro@pedro-school2:~$ sudo ssh test@localhost
[sudo] password for pedro:
ssh: connect to host localhost port 22: Connection refused
pedro@pedro-school2:~$
Reading more, I read that, if I connect from a different wifi, the ssh connection should succeed. Doesn't!

Last edited by Pedroski; 06-15-2019 at 05:02 PM.
 
Old 06-15-2019, 05:52 PM   #4
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Original Poster
Rep: Reputation: 73
I called goDaddy help, the woman said, ssh is not blocked, but there was something weird about my ip here in China.
She connected to my webpage ip at goDaddy with Putty, which is ssh, I'm told. Not blocked.

I have an idea. Will this work?

I tried to upload a key. I remember seeing a message:

Quote:
pedro@pedro-school2:~$ ssh-copy-id -i ~/.ssh/goDaddy_ed25519 mycPanelusername@123.456.123.456
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/pedro/.ssh/goDaddy_ed25519.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed

/usr/bin/ssh-copy-id: ERROR: ssh_exchange_identification: read: Connection reset by peer

pedro@pedro-school2:~$
Can I upload the ssh key by hand. If so, where should I put it?

Quote:
pedro@pedro-school2:~$ ssh -vvv mycPanelusername@123.456.123.456
OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "123.456.123.456" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to 123.456.123.456 [123.456.123.456] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/pedro/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/pedro/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/pedro/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/pedro/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/pedro/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/pedro/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/pedro/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/pedro/.ssh/id_ed25519-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
ssh_exchange_identification: read: Connection reset by peer
pedro@pedro-school2:~$

Last edited by Pedroski; 06-15-2019 at 05:53 PM.
 
Old 06-15-2019, 06:46 PM   #5
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Original Poster
Rep: Reputation: 73
Fixed it: seems it was the Great Firewall of China causing trouble again. After I connected to expressvpn, I uploaded the key fine:

Quote:
pedro@pedro-school2:~$ ssh-copy-id -i ~/.ssh/goDaddy_ed25519 mycPanelusername@123.456.123.456
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/pedro/.ssh/goDaddy_ed25519.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
mycPanelusername@123.456.123.456's password:

Number of key(s) added: 1

Now try logging into the machine, with: "ssh 'mycPanelusername@123.456.123.456'"
and check to make sure that only the key(s) you wanted were added.

pedro@pedro-school2:~$
 
  


Reply

Tags
godaddy



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh: connection to host port: 22: Connection timed out lost connection cucolin@ Linux - Server 4 11-22-2011 06:15 AM
how to log ssh activity in /var/log/ssh/ssh*.log MrUmunhum Linux - Server 3 11-02-2011 02:25 AM
ssh-agent, ssh-add and ssh-keygen AND CVS raylpc Linux - General 2 11-19-2008 02:50 AM
setting up an ssh soxy or local ssh tunnel from within an ssh soxy Mangenius Linux - Networking 0 03-05-2007 03:15 PM
Passwordless SSH with SSH commercial server and open ssh cereal83 Linux - General 7 04-18-2006 12:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration