Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 27th October 2009, 13:47
matey matey is offline
Member
 
Join Date: Feb 2009
Posts: 93
Thanks: 13
Thanked 3 Times in 3 Posts
Question How To SSH Using Different Port?

I use the ssh --help but it is not clear as to how to use that -D switch in there?

I want to use a different port than 22 since I think it's been blocked.
I only get " Bad dynamic port " no matter which port I use even 22.

The server is running our telephones (Asterisk) and has OpenBSD installed on it. Has NO display at the console?! (may be KVM switch box problem? but other servers work via the same sw box!) , I need to get into it to see what the problem is and re run the asterisk (extensions/sip reload) commands to register a phone set. But no go!
got root too.
any help will be appreciated, I mean the real help lol not the one that comes with the commands.
Reply With Quote
Sponsored Links
  #2  
Old 27th October 2009, 14:04
damir damir is offline
Senior Member
 
Join Date: Jun 2006
Posts: 375
Thanks: 11
Thanked 51 Times in 42 Posts
Default

In terminal type:

Code:
vi /etc/ssh/sshd_config
Change from Port 22 to ex. Port 1011

Save and restart ssh

You should stay in the terminal window if you are changing Port so you don't locks your self out. Try to login in with new session to se if it works.
Reply With Quote
The Following User Says Thank You to damir For This Useful Post:
matey (27th October 2009)
  #3  
Old 27th October 2009, 15:29
matey matey is offline
Member
 
Join Date: Feb 2009
Posts: 93
Thanks: 13
Thanked 3 Times in 3 Posts
Default

OK Thank you for your prompt reply!
I'll try that later (I got to go now).

I was at the server all this time and got the display back....


But I really need to know how to re Enable ssh on/to this server.(I guess I open another thread)?

because for instance the "asterisk -r" own command prompt has a very long help file which is very useful but it scrolls off the screen too quick and you cannot use |more /less whatever to stop and read it!
cant pass it to a file either > ? it is their own shell i guess?

With ssh I can use my own desktop (GUI) terminal to scroll up/down and read the help files plus do other things.

Thank You!

Best Regards;

Last edited by matey; 27th October 2009 at 15:32.
Reply With Quote
  #4  
Old 29th October 2009, 02:48
computer_freak_8 computer_freak_8 is offline
Junior Member
 
Join Date: Sep 2009
Posts: 18
Thanks: 3
Thanked 5 Times in 5 Posts
 
Default

Quote:
Originally Posted by matey View Post
I use the ssh --help but it is not clear as to how to use that -D switch in there?

I want to use a different port than 22 since I think it's been blocked.
I only get " Bad dynamic port " no matter which port I use even 22.

The server is running our telephones (Asterisk) and has OpenBSD installed on it. Has NO display at the console?!
I don't think you want the -D option. Maybe the -d option, though. (The -D will not detach from the console; the -d will debug.)
See this, too.

Quote:
Originally Posted by matey View Post
But I really need to know how to re Enable ssh on/to this server.(I guess I open another thread)?

because for instance the "asterisk -r" own command prompt has a very long help file which is very useful but it scrolls off the screen too quick and you cannot use |more /less whatever to stop and read it!
cant pass it to a file either > ? it is their own shell i guess?

With ssh I can use my own desktop (GUI) terminal to scroll up/down and read the help files plus do other things.
I'm a bit confused by what you're trying to do. To enable SSH access on the remote machine, the program that needs to run is "sshd", not "ssh". To access the remote machine, for example, from your scrollable desktop GUI terminal, you'll need to use the program "ssh", following the syntax like:
Code:
ssh -p 22 username@192.168.0.7
You'll need to replace the "22" with whatever port you the server (sshd) is running on. The "username" needs to be the login name. The "@" symbol just tells the client (ssh) that the username you typed in should be used for accessing the IP address you typed in. In the example I gave, that IP address was "192.168.0.7", so you'll need to replace it with whatever you need for your server.

As for enabling the SSH daemon (sshd)/SSH server, try this page; it mentions:
Quote:
It is normally started at boot from /etc/rc.
Hope this helps; let us know either way. Good luck!
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail Question: installed smf forum on centos perfect server setup with ispconfig happz Installation/Configuration 7 22nd August 2008 14:15
Getting e-mail working hansoffate Installation/Configuration 29 13th August 2008 17:33
SSH port other than default 22 Quinton HOWTO-Related Questions 6 23rd November 2006 23:08
SSH port forwarding (SQLYog Tunnel) mastorna Server Operation 0 22nd June 2006 02:16
How to install BFD (Brute Force Detection) domino Tips/Tricks/Mods 9 31st March 2006 23:40


All times are GMT +2. The time now is 18:08.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.