View Full Version : [ubuntu] 10.04 ssh to alternate port
litspliff
September 7th, 2011, 09:11 AM
i would like to use an alternate port for ssh access.
what is the standard procedure for accomplishing this?
sorry for the noob question, but i've never done it before, and the forum search functionality is not very good.
matt_symes
September 7th, 2011, 09:23 AM
Hi
Edit the port number in your /etc/ssh/sshd_config on your ssh server and connect to it using
ssh -p port_number user@host
A quick Google search never goes a miss. Here's one hit.
http://techie-buzz.com/foss/change-default-ssh-port-in-linux.html
Kind regards
litspliff
September 7th, 2011, 09:53 AM
awesome.
did it.
worked.
much thanks.
:)
gmargo
September 7th, 2011, 06:30 PM
You can also store the alternate port information in $HOME/.ssh/config. Then you don't need to remember the "-p port" option for each host.
Here's an example $HOME/.ssh/config file. All of the options are explained in the ssh_config(5) man page.
Host machine1
Port 2222
Host machine2.example.com
Port 2233
Host *
ForwardAgent yes
ForwardX11 yes
ServerAliveInterval 300
litspliff
September 18th, 2011, 07:31 PM
the reason i did this in the first place was because i suspected an exploit had been executed on the port.
now i'm not so sure.
before i changed it, i started getting a response from the server of "input/output error" after almost every command entered in the shell session, although a few basic commands (ls, cd, etc) still worked and the tunneling functionality still worked.
in a panic, i wiped the OS and re-installed using the alternate ssh port (5 digits).
after two days on the internets, it started responding "input/output error" and dropping the shell session immediately after login. tunneling still works.
what the H?
i need shell access on this machine, but i seem to be SOL.
should i start a new thread for this, or can i just continue the conversation here?
this machine is running xubuntu 11.04 i386 alt.
before the wipe, 10.04 i386 alt.
this is the machine
http://slauce.com/log/html/200906290330.html
it looks a lot cleaner now.
the pics are from the first assembly, and much has been upgraded since the post.
the hardware is solid....old...but solid.
it just sits on a shelf with 2 real VCRs looking like another normal VCR.
no monitor, no keyboard.
just two cables. power and network.
thanks in advance.;)
Powered by vBulletin® Version 4.2.2 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.