You are not logged in.

#1 2005-09-16 17:40:52

timm
Member
From: Wisconsin
Registered: 2004-02-25
Posts: 417

ssh to a different port

I'm playing around with ssh, and have it running on one machine.  I tried changing the port that it listens on, and can get to that via putty on a windows machine.  What I'm having trouble with is the command line syntax to ssh to the host from another linux machine.
How do I specify this alternate port on the command line?

Offline

#2 2005-09-16 17:48:45

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: ssh to a different port

What happened to your man ssh ? tongue

Try ssh -l your_user_login_name -p remote_host_port host.address.blah

Offline

#3 2005-09-16 17:50:48

jondkent
Member
From: London
Registered: 2005-09-13
Posts: 123

Re: ssh to a different port

Hi,

I believe you need the -p flag, from the man page :

-p port
             Port to connect to on the remote host.  This can be specified on
             a per-host basis in the configuration file.

Jon

Offline

#4 2005-09-16 21:10:21

timm
Member
From: Wisconsin
Registered: 2004-02-25
Posts: 417

Re: ssh to a different port

I actually did read at least part of the man page on this one, but sometimes (as in this case) I don't find man pages at all helpful; it's like reading Greek (assuming you don't know how to read Greek, I suppose) :oops:

I'll give your suggestions a try!

I'd really like to see something like man pages, but with examples to show what some of this stuff means or does, but I haven't found that resource yet.

Offline

#5 2005-09-17 17:58:34

Euphoric Nightmare
Member
From: Kentucky
Registered: 2005-05-02
Posts: 283

Re: ssh to a different port

it would be something like

ssh user@ipaddress -p portnumber

You can always change the port in the ssh_config though.  Thats how I rock.

Offline

Board footer

Powered by FluxBB