LinuxQuestions.org
Help answer threads with 0 replies.
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 08-01-2016, 10:03 AM   #1
JohnyQC77
LQ Newbie
 
Registered: Aug 2016
Posts: 1

Rep: Reputation: Disabled
Question SSH - How to avoid user to have my ISP domain added to it.


Hi,
I have configured my ssh server and all.

Everything is working fine, but when I try to use SSH using my remote IP...
If I enter my local username (the same way as when I use the local ip)it add the ISP domain to it...

i.e. User = user1
i.e. Hostname = host1
i.e. ISP domain = domain.ISPcompany.com

so if I ssh using user1 and local ip.. everything is fine.
if I ssh using user1 and remote IP.. it say wrong password and it show user as being
user1@domain.ISPcompany.com.

if I try something like ssh -l user1@host1.... it will end up with something like
user1@host1@domain.ISPcompany.com...

how can I use just my local user to connect remotely using my public IP and not have the ISP domain added to my user?
 
Old 08-01-2016, 10:20 AM   #2
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Welcome to LQ!
Start with
Code:
man ssh_config
in your terminal, or favorite search_engine.
Ask you have any additional questions about it.
 
Old 08-01-2016, 04:09 PM   #3
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,210
Blog Entries: 3

Rep: Reputation: 3702Reputation: 3702Reputation: 3702Reputation: 3702Reputation: 3702Reputation: 3702Reputation: 3702Reputation: 3702Reputation: 3702Reputation: 3702Reputation: 3702
Quote:
Originally Posted by JohnyQC77 View Post
if I try something like ssh -l user1@host1.... it will end up with something like
user1@host1@domain.ISPcompany.com...
+1 for the manual page on ssh_config. There is a world of useful configurations in there. However, in this case it is the manual page for ssh, the client itself, you are looking for. The -l does not need user@ prepended to the remote host. Use it like this:

ssh -l user1 host1....

Note the spaces and the lack of the at sign.

Back to ssh_config instead, if you look at ssh_config you will see that you could set up ~/.ssh/config to make a shortcut or two:

Code:
Host host1
        HostName host1.example.com
        User user1
        Port 22
That allows you to connect as user1 to host host1.example.com with just ssh host1 in the shell.

Last edited by Turbocapitalist; 08-01-2016 at 04:10 PM.
 
Old 08-01-2016, 07:13 PM   #4
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Linux From Scratch, Slackware64, Partedmagic
Posts: 3,125

Rep: Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840
If you are logged in to your local machine with the same login as the remote you dont need to give the user ssh assumes you will be using the same user so in my case
Code:
ssh homenet
is the same as:
ssh -l keithhedger homenet

Last edited by Keith Hedger; 08-01-2016 at 07:14 PM. Reason: wicsh i culd tpye
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
New User added, bot not able to login via SSH Kumaresanpvk77 Linux - Server 15 03-10-2016 03:25 AM
files updated when new user domain is added abinasunny@ymail.com Linux - Newbie 2 05-28-2015 02:07 AM
Running Samba in a VM to avoid domain user rejoins rylan76 Linux - Software 3 01-23-2013 06:02 AM
Can not authen domain user via SSH wegadnie Linux - Server 1 08-18-2009 03:08 AM
cant send email (using sendmail) to newly added domain user sirjosi Linux - Newbie 0 10-22-2003 02:12 AM

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

All times are GMT -5. The time now is 09:35 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