Connecting to amazon lightsail ubuntu server using different ssh port
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
1
down vote
favorite
I have changed ssh port in lightsail server in /etc/ssh/sshd_config
file to 2200, I have enabled firewall to accept connections on port 2200. But when I am trying to connect through my local machine using command,
ssh -i key.pem ubuntu@13.xxx.x.109 -p 2200
It is showing me an error "ssh: connect to host 13.xxx.x.109 port 2200: Connection refused". Can you help me out why it's connection is being refused?
ssh
add a comment |Â
up vote
1
down vote
favorite
I have changed ssh port in lightsail server in /etc/ssh/sshd_config
file to 2200, I have enabled firewall to accept connections on port 2200. But when I am trying to connect through my local machine using command,
ssh -i key.pem ubuntu@13.xxx.x.109 -p 2200
It is showing me an error "ssh: connect to host 13.xxx.x.109 port 2200: Connection refused". Can you help me out why it's connection is being refused?
ssh
Has the key already been shared to the lightsail server, could you use it to login successfully on the default port? Also, do you need to use the absolute path to the key file?
â Arronical
Mar 28 at 9:51
yeah i was able to connect to lightsail server through port 22 using private key but when I changed port settings and enabled firewall settings on lightsail server its showing me the error shown above. Currently I am using ubuntu as local machine.
â Bhanu Sankhyan
Mar 28 at 12:07
1
Did you change the port that the ssh server is listening on and restart the ssh server? This is normally done in the/etc/ssh/sshd_config
file on the server you're trying to ssh into.
â Arronical
Mar 28 at 12:24
1
yes I did changed the port to 2200 and i also checked with nmap, its showing "host is up" on 2200 port of lightsail ubntu server,that means 2200 port is open on server but it's not listening on port 2200 when i am connecting through ssh using my local machine.
â Bhanu Sankhyan
Mar 28 at 12:38
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I have changed ssh port in lightsail server in /etc/ssh/sshd_config
file to 2200, I have enabled firewall to accept connections on port 2200. But when I am trying to connect through my local machine using command,
ssh -i key.pem ubuntu@13.xxx.x.109 -p 2200
It is showing me an error "ssh: connect to host 13.xxx.x.109 port 2200: Connection refused". Can you help me out why it's connection is being refused?
ssh
I have changed ssh port in lightsail server in /etc/ssh/sshd_config
file to 2200, I have enabled firewall to accept connections on port 2200. But when I am trying to connect through my local machine using command,
ssh -i key.pem ubuntu@13.xxx.x.109 -p 2200
It is showing me an error "ssh: connect to host 13.xxx.x.109 port 2200: Connection refused". Can you help me out why it's connection is being refused?
ssh
ssh
edited Mar 28 at 9:47
![](https://i.stack.imgur.com/smMAw.jpg?s=32&g=1)
![](https://i.stack.imgur.com/smMAw.jpg?s=32&g=1)
Arronical
12.6k84489
12.6k84489
asked Mar 28 at 8:51
![](https://lh3.googleusercontent.com/-XdUIqdMkCWA/AAAAAAAAAAI/AAAAAAAAAAA/4252rscbv5M/photo.jpg?sz=32)
![](https://lh3.googleusercontent.com/-XdUIqdMkCWA/AAAAAAAAAAI/AAAAAAAAAAA/4252rscbv5M/photo.jpg?sz=32)
Bhanu Sankhyan
61
61
Has the key already been shared to the lightsail server, could you use it to login successfully on the default port? Also, do you need to use the absolute path to the key file?
â Arronical
Mar 28 at 9:51
yeah i was able to connect to lightsail server through port 22 using private key but when I changed port settings and enabled firewall settings on lightsail server its showing me the error shown above. Currently I am using ubuntu as local machine.
â Bhanu Sankhyan
Mar 28 at 12:07
1
Did you change the port that the ssh server is listening on and restart the ssh server? This is normally done in the/etc/ssh/sshd_config
file on the server you're trying to ssh into.
â Arronical
Mar 28 at 12:24
1
yes I did changed the port to 2200 and i also checked with nmap, its showing "host is up" on 2200 port of lightsail ubntu server,that means 2200 port is open on server but it's not listening on port 2200 when i am connecting through ssh using my local machine.
â Bhanu Sankhyan
Mar 28 at 12:38
add a comment |Â
Has the key already been shared to the lightsail server, could you use it to login successfully on the default port? Also, do you need to use the absolute path to the key file?
â Arronical
Mar 28 at 9:51
yeah i was able to connect to lightsail server through port 22 using private key but when I changed port settings and enabled firewall settings on lightsail server its showing me the error shown above. Currently I am using ubuntu as local machine.
â Bhanu Sankhyan
Mar 28 at 12:07
1
Did you change the port that the ssh server is listening on and restart the ssh server? This is normally done in the/etc/ssh/sshd_config
file on the server you're trying to ssh into.
â Arronical
Mar 28 at 12:24
1
yes I did changed the port to 2200 and i also checked with nmap, its showing "host is up" on 2200 port of lightsail ubntu server,that means 2200 port is open on server but it's not listening on port 2200 when i am connecting through ssh using my local machine.
â Bhanu Sankhyan
Mar 28 at 12:38
Has the key already been shared to the lightsail server, could you use it to login successfully on the default port? Also, do you need to use the absolute path to the key file?
â Arronical
Mar 28 at 9:51
Has the key already been shared to the lightsail server, could you use it to login successfully on the default port? Also, do you need to use the absolute path to the key file?
â Arronical
Mar 28 at 9:51
yeah i was able to connect to lightsail server through port 22 using private key but when I changed port settings and enabled firewall settings on lightsail server its showing me the error shown above. Currently I am using ubuntu as local machine.
â Bhanu Sankhyan
Mar 28 at 12:07
yeah i was able to connect to lightsail server through port 22 using private key but when I changed port settings and enabled firewall settings on lightsail server its showing me the error shown above. Currently I am using ubuntu as local machine.
â Bhanu Sankhyan
Mar 28 at 12:07
1
1
Did you change the port that the ssh server is listening on and restart the ssh server? This is normally done in the
/etc/ssh/sshd_config
file on the server you're trying to ssh into.â Arronical
Mar 28 at 12:24
Did you change the port that the ssh server is listening on and restart the ssh server? This is normally done in the
/etc/ssh/sshd_config
file on the server you're trying to ssh into.â Arronical
Mar 28 at 12:24
1
1
yes I did changed the port to 2200 and i also checked with nmap, its showing "host is up" on 2200 port of lightsail ubntu server,that means 2200 port is open on server but it's not listening on port 2200 when i am connecting through ssh using my local machine.
â Bhanu Sankhyan
Mar 28 at 12:38
yes I did changed the port to 2200 and i also checked with nmap, its showing "host is up" on 2200 port of lightsail ubntu server,that means 2200 port is open on server but it's not listening on port 2200 when i am connecting through ssh using my local machine.
â Bhanu Sankhyan
Mar 28 at 12:38
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
You need to turn on the port of the lightsail manage console.
Use Custom not SSH
Then change the ssh port to 2200
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
You need to turn on the port of the lightsail manage console.
Use Custom not SSH
Then change the ssh port to 2200
add a comment |Â
up vote
1
down vote
You need to turn on the port of the lightsail manage console.
Use Custom not SSH
Then change the ssh port to 2200
add a comment |Â
up vote
1
down vote
up vote
1
down vote
You need to turn on the port of the lightsail manage console.
Use Custom not SSH
Then change the ssh port to 2200
You need to turn on the port of the lightsail manage console.
Use Custom not SSH
Then change the ssh port to 2200
answered Apr 20 at 17:18
![](https://lh4.googleusercontent.com/-r7mReRGUoR4/AAAAAAAAAAI/AAAAAAAAHY8/WfUrgJnbKt8/photo.jpg?sz=32)
![](https://lh4.googleusercontent.com/-r7mReRGUoR4/AAAAAAAAAAI/AAAAAAAAHY8/WfUrgJnbKt8/photo.jpg?sz=32)
Luis Torruella
112
112
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1019891%2fconnecting-to-amazon-lightsail-ubuntu-server-using-different-ssh-port%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Has the key already been shared to the lightsail server, could you use it to login successfully on the default port? Also, do you need to use the absolute path to the key file?
â Arronical
Mar 28 at 9:51
yeah i was able to connect to lightsail server through port 22 using private key but when I changed port settings and enabled firewall settings on lightsail server its showing me the error shown above. Currently I am using ubuntu as local machine.
â Bhanu Sankhyan
Mar 28 at 12:07
1
Did you change the port that the ssh server is listening on and restart the ssh server? This is normally done in the
/etc/ssh/sshd_config
file on the server you're trying to ssh into.â Arronical
Mar 28 at 12:24
1
yes I did changed the port to 2200 and i also checked with nmap, its showing "host is up" on 2200 port of lightsail ubntu server,that means 2200 port is open on server but it's not listening on port 2200 when i am connecting through ssh using my local machine.
â Bhanu Sankhyan
Mar 28 at 12:38